| OLD | NEW |
| 1 ; This is a regression test that idiv and div operands are legalized | 1 ; This is a regression test that idiv and div operands are legalized |
| 2 ; (they cannot be constants and can only be reg/mem for x86). | 2 ; (they cannot be constants and can only be reg/mem for x86). |
| 3 | 3 |
| 4 ; RUN: %p2i --assemble --disassemble -i %s --args -O2 --verbose none \ | 4 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s |
| 5 ; RUN: | FileCheck %s | 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s |
| 6 ; RUN: %p2i --assemble --disassemble -i %s --args -Om1 --verbose none \ | |
| 7 ; RUN: | FileCheck %s | |
| 8 | 6 |
| 9 define i32 @Sdiv_const8_b(i8 %a) { | 7 define i32 @Sdiv_const8_b(i8 %a) { |
| 10 ; CHECK-LABEL: Sdiv_const8_b | 8 ; CHECK-LABEL: Sdiv_const8_b |
| 11 entry: | 9 entry: |
| 12 %div = sdiv i8 %a, 12 | 10 %div = sdiv i8 %a, 12 |
| 13 ; CHECK: mov {{.*}},0xc | 11 ; CHECK: mov {{.*}},0xc |
| 14 ; CHECK-NOT: idiv 0xc | 12 ; CHECK-NOT: idiv 0xc |
| 15 %div_ext = sext i8 %div to i32 | 13 %div_ext = sext i8 %div to i32 |
| 16 ret i32 %div_ext | 14 ret i32 %div_ext |
| 17 } | 15 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 52 } |
| 55 | 53 |
| 56 define i32 @Urem_const_b(i32 %a) { | 54 define i32 @Urem_const_b(i32 %a) { |
| 57 ; CHECK-LABEL: Urem_const_b | 55 ; CHECK-LABEL: Urem_const_b |
| 58 entry: | 56 entry: |
| 59 %rem = urem i32 %a, 4567 | 57 %rem = urem i32 %a, 4567 |
| 60 ; CHECK: mov {{.*}},0x11d7 | 58 ; CHECK: mov {{.*}},0x11d7 |
| 61 ; CHECK-NOT: div 0x11d7 | 59 ; CHECK-NOT: div 0x11d7 |
| 62 ret i32 %rem | 60 ret i32 %rem |
| 63 } | 61 } |
| OLD | NEW |