1 // RUN: llvm-tblgen %s | FileCheck %s
7 int shifted_b = !shl(b, 2);
8 int shifted_i = !shl(i, 2);
11 // CHECK: shifted_b = 8
12 // CHECK: shifted_i = 8
14 class Int<int value> {
18 def v1022 : Int<1022>;
27 // CHECK: Value = 1023
28 def v1023 : Int<!or(v1022.Value, 1)>;
30 def v1024 : Int<1024>;
32 // CHECK: Value = 1024
34 def v1025 : Int<!add(v1024.Value, 1)>;
36 // CHECK: Value = 1025
40 def v12 : Int<!mul(4, 3)>;
49 def v2048 : Int<!add(v1024.Value, v1024.Value)>;
51 // CHECK: Value = 2048
53 def v0 : Int<!and(v1024.Value, v2048.Value)>;
54 def v1 : Int<!and(v1025.Value, 1)>;
57 // CHECK: Value = 3072
58 def v3072 : Int<!or(v1024.Value, v2048.Value)>;
66 def v4 : Int<!add(v2.Value, 1, v1.Value)>;
67 def v7 : Int<!or(v1.Value, v2.Value, v4.Value)>;
68 def v1a : Int<!and(v7.Value, 5, v1.Value)>;
72 def v84 : Int<!mul(v12.Value, v7.Value)>;
76 def v924 : Int<!mul(v84.Value, 11)>;