summaryrefslogtreecommitdiff
path: root/test/TableGen/math.td
diff options
context:
space:
mode:
Diffstat (limited to 'test/TableGen/math.td')
-rw-r--r--test/TableGen/math.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/TableGen/math.td b/test/TableGen/math.td
index 59d16ae908e2..71c60579de21 100644
--- a/test/TableGen/math.td
+++ b/test/TableGen/math.td
@@ -1,6 +1,16 @@
// RUN: llvm-tblgen %s | FileCheck %s
// XFAIL: vg_leak
+def shifts {
+ bits<2> b = 0b10;
+ int i = 2;
+ int shifted_b = !shl(b, 2);
+ int shifted_i = !shl(i, 2);
+}
+// CHECK: def shifts
+// CHECK: shifted_b = 8
+// CHECK: shifted_i = 8
+
class Int<int value> {
int Value = value;
}