summaryrefslogtreecommitdiffstats
path: root/test/TableGen/LetInsideMultiClasses.td
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
commit9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 (patch)
tree9de1c5f67a98cd0e73c60838396486c984f63ac2 /test/TableGen/LetInsideMultiClasses.td
parent1e3dec662ea18131c495db50caccc57f77b7a5fe (diff)
downloadFreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.zip
FreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.tar.gz
Update LLVM to r108243.
Diffstat (limited to 'test/TableGen/LetInsideMultiClasses.td')
-rw-r--r--test/TableGen/LetInsideMultiClasses.td29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/TableGen/LetInsideMultiClasses.td b/test/TableGen/LetInsideMultiClasses.td
new file mode 100644
index 0000000..9238bf4
--- /dev/null
+++ b/test/TableGen/LetInsideMultiClasses.td
@@ -0,0 +1,29 @@
+// RUN: tblgen %s | grep "bit IsDouble = 1;" | count 3
+// XFAIL: vg_leak
+
+class Instruction<bits<4> opc, string Name> {
+ bits<4> opcode = opc;
+ string name = Name;
+ bit IsDouble = 0;
+}
+
+multiclass basic_r<bits<4> opc> {
+ let name = "newname" in {
+ def rr : Instruction<opc, "rr">;
+ def rm : Instruction<opc, "rm">;
+ }
+
+ let name = "othername" in
+ def rx : Instruction<opc, "rx">;
+}
+
+multiclass basic_ss<bits<4> opc> {
+ let IsDouble = 0 in
+ defm SS : basic_r<opc>;
+
+ let IsDouble = 1 in
+ defm SD : basic_r<opc>;
+}
+
+defm ADD : basic_ss<0xf>;
+
OpenPOWER on IntegriCloud