AVX-512: Added FMA instructions, intrinsics an tests for KNL and SKX targets
[oota-llvm.git] / test / TableGen / MultiClassDefName.td
index 75d6af5b42b966f1f374cf00091e403c49a61f16..811d92667eb2be17c534ffdb8aea67ee8dfc38a2 100644 (file)
@@ -1,4 +1,8 @@
-// RUN: llvm-tblgen %s | grep WorldHelloCC | count 1
+// RUN: llvm-tblgen %s | FileCheck %s
+// XFAIL: vg_leak
+
+// CHECK: WorldHelloCC
+// CHECK-NOT: WorldHelloCC
 
 class C<string n> {
   string name = n;
@@ -10,3 +14,28 @@ multiclass Names<string n, string m> {
 }
 
 defm Hello : Names<"hello", "world">;
+
+// Ensure that the same anonymous name is used as the prefix for all defs in an
+// anonymous multiclass.
+
+class Outer<C i> {
+  C Inner = i;
+}
+
+multiclass MC<string name> {
+  def hi : C<name>;
+  def there : Outer<!cast<C>(!strconcat(NAME, "hi"))>;
+}
+
+defm : MC<"foo">;
+
+multiclass MC2<string name> {
+  def there : Outer<C<name> >;
+}
+
+// Ensure that we've correctly captured the reference to name from the implicit
+// anonymous C def in the template parameter list of Outer.
+// CHECK-NOT: MC2::name
+
+defm : MC2<"bar">;
+