1// RUN: llvm-tblgen %s | FileCheck %s 2// XFAIL: vg_leak 3 4def shifts { 5 bits<2> b = 0b10; 6 int i = 2; 7 int shifted_b = !shl(b, 2); 8 int shifted_i = !shl(i, 2); 9} 10// CHECK: def shifts 11// CHECK: shifted_b = 8 12// CHECK: shifted_i = 8 13 14class Int<int value> { 15 int Value = value; 16} 17 18// CHECK: def v0 19// CHECK: Value = 0 20 21// CHECK: def v1 22// CHECK: Value = 1 23 24def v1024 : Int<1024>; 25// CHECK: def v1024 26// CHECK: Value = 1024 27 28def v1025 : Int<!add(v1024.Value, 1)>; 29// CHECK: def v1025 30// CHECK: Value = 1025 31 32def v2048 : Int<!add(v1024.Value, v1024.Value)>; 33// CHECK: def v2048 34// CHECK: Value = 2048 35 36def v0 : Int<!and(v1024.Value, v2048.Value)>; 37def v1 : Int<!and(v1025.Value, 1)>; 38