| OLD | NEW |
| 1 ; Tests various aspects of i1 related lowering. | 1 ; Tests various aspects of i1 related lowering. |
| 2 | 2 |
| 3 ; RUN: %p2i -i %s --assemble --disassemble -a -O2 --verbose none \ | 3 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s |
| 4 ; RUN: | FileCheck %s | 4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 | FileCheck %s |
| 5 ; RUN: %p2i -i %s --assemble --disassemble -a -Om1 --verbose none \ | |
| 6 ; RUN: | FileCheck %s | |
| 7 | 5 |
| 8 ; Test that and with true uses immediate 1, not -1. | 6 ; Test that and with true uses immediate 1, not -1. |
| 9 define internal i32 @testAndTrue(i32 %arg) { | 7 define internal i32 @testAndTrue(i32 %arg) { |
| 10 entry: | 8 entry: |
| 11 %arg_i1 = trunc i32 %arg to i1 | 9 %arg_i1 = trunc i32 %arg to i1 |
| 12 %result_i1 = and i1 %arg_i1, true | 10 %result_i1 = and i1 %arg_i1, true |
| 13 %result = zext i1 %result_i1 to i32 | 11 %result = zext i1 %result_i1 to i32 |
| 14 ret i32 %result | 12 ret i32 %result |
| 15 } | 13 } |
| 16 ; CHECK-LABEL: testAndTrue | 14 ; CHECK-LABEL: testAndTrue |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 %arg_i1 = fptosi double %arg to i1 | 185 %arg_i1 = fptosi double %arg to i1 |
| 188 %result = sext i1 %arg_i1 to i32 | 186 %result = sext i1 %arg_i1 to i32 |
| 189 ret i32 %result | 187 ret i32 %result |
| 190 } | 188 } |
| 191 ; CHECK-LABEL: testFptosiDouble | 189 ; CHECK-LABEL: testFptosiDouble |
| 192 ; CHECK: cvttsd2si | 190 ; CHECK: cvttsd2si |
| 193 ; CHECK: and {{.*}},0x1 | 191 ; CHECK: and {{.*}},0x1 |
| 194 ; CHECK: movzx [[REG:.*]], | 192 ; CHECK: movzx [[REG:.*]], |
| 195 ; CHECK-NEXT: shl [[REG]],0x1f | 193 ; CHECK-NEXT: shl [[REG]],0x1f |
| 196 ; CHECK-NEXT: sar [[REG]],0x1f | 194 ; CHECK-NEXT: sar [[REG]],0x1f |
| OLD | NEW |