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
45 def v2048 : Int<!add(v1024.Value, v1024.Value)>;
47 // CHECK: Value = 2048
49 def v0 : Int<!and(v1024.Value, v2048.Value)>;
50 def v1 : Int<!and(v1025.Value, 1)>;
53 // CHECK: Value = 3072
54 def v3072 : Int<!or(v1024.Value, v2048.Value)>;
62 def v4 : Int<!add(v2.Value, 1, v1.Value)>;
63 def v7 : Int<!or(v1.Value, v2.Value, v4.Value)>;
64 def v1a : Int<!and(v7.Value, 5, v1.Value)>;