1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=instruction-select %s -o - \
5 name: const_i32_INT_MIN
8 tracksRegLiveness: true
13 ; CHECK-LABEL: name: const_i32_INT_MIN
14 ; CHECK: liveins: $x10
16 ; CHECK-NEXT: [[LUI:%[0-9]+]]:gpr = LUI 524288
17 ; CHECK-NEXT: $x10 = COPY [[LUI]]
18 ; CHECK-NEXT: PseudoRET implicit $x10
19 %0:gprb(s32) = G_CONSTANT i32 -2147483648
21 PseudoRET implicit $x10
25 name: const_i32_neg_2147483000
28 tracksRegLiveness: true
33 ; CHECK-LABEL: name: const_i32_neg_2147483000
34 ; CHECK: liveins: $x10
36 ; CHECK-NEXT: [[LUI:%[0-9]+]]:gpr = LUI 524288
37 ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI [[LUI]], 648
38 ; CHECK-NEXT: $x10 = COPY [[ADDI]]
39 ; CHECK-NEXT: PseudoRET implicit $x10
40 %0:gprb(s32) = G_CONSTANT i32 -2147483000
42 PseudoRET implicit $x10
46 name: const_i32_INT_MAX
49 tracksRegLiveness: true
54 ; CHECK-LABEL: name: const_i32_INT_MAX
55 ; CHECK: liveins: $x10
57 ; CHECK-NEXT: [[LUI:%[0-9]+]]:gpr = LUI 524288
58 ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI [[LUI]], -1
59 ; CHECK-NEXT: $x10 = COPY [[ADDI]]
60 ; CHECK-NEXT: PseudoRET implicit $x10
61 %0:gprb(s32) = G_CONSTANT i32 2147483647
63 PseudoRET implicit $x10
67 name: const_i32_2147483000
70 tracksRegLiveness: true
75 ; CHECK-LABEL: name: const_i32_2147483000
76 ; CHECK: liveins: $x10
78 ; CHECK-NEXT: [[LUI:%[0-9]+]]:gpr = LUI 524288
79 ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI [[LUI]], -648
80 ; CHECK-NEXT: $x10 = COPY [[ADDI]]
81 ; CHECK-NEXT: PseudoRET implicit $x10
82 %0:gprb(s32) = G_CONSTANT i32 2147483000
84 PseudoRET implicit $x10
91 tracksRegLiveness: true
96 ; CHECK-LABEL: name: const_i32_256
97 ; CHECK: liveins: $x10
99 ; CHECK-NEXT: [[ADDI:%[0-9]+]]:gpr = ADDI $x0, 256
100 ; CHECK-NEXT: $x10 = COPY [[ADDI]]
101 ; CHECK-NEXT: PseudoRET implicit $x10
102 %0:gprb(s32) = G_CONSTANT i32 256
104 PseudoRET implicit $x10
110 regBankSelected: true
111 tracksRegLiveness: true
116 ; CHECK-LABEL: name: const_i32_0
117 ; CHECK: liveins: $x10
119 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x0
120 ; CHECK-NEXT: $x10 = COPY [[COPY]]
121 ; CHECK-NEXT: PseudoRET implicit $x10
122 %0:gprb(s32) = G_CONSTANT i32 0
124 PseudoRET implicit $x10