Fix a FIXME about the format and add a test.
[oota-llvm.git] / test / TableGen / defmclass.td
index ef8e8f794bac0baed55d9098139c81c36e0f31d8..6198c000fddcf6e3b19e75fd8fc3caf4ca5c8df2 100644 (file)
@@ -1,5 +1,4 @@
-// RUN: tblgen %s | FileCheck %s
-// XFAIL: vg_leak
+// RUN: llvm-tblgen %s | FileCheck %s
 
 class XD { bits<4> Prefix = 11; }
 // CHECK: Prefix = { 1, 1, 0, 0 };
@@ -16,6 +15,7 @@ class BaseI {
 class I<bits<4> op> : BaseI {
   bits<4> opcode = op;
   int val = !if(!eq(Prefix, xd.Prefix), 7, 21);
+  int check = !if(hasVEX_4VPrefix, 0, 10);
 }
 
 multiclass R {
@@ -33,4 +33,17 @@ multiclass Y {
   defm SD : R, M, XS;
 }
 
+// CHECK: int check = 0;
 defm Instr : Y, VEX;
+
+
+// Anonymous defm.
+
+multiclass SomeAnonymous<int x> {
+  def rm;
+  def mr;
+}
+
+// These multiclasses shouldn't conflict.
+defm : SomeAnonymous<1>;
+defm : SomeAnonymous<2>;
\ No newline at end of file