| OLD | NEW |
| 1 ; This checks the correctness of the lowering code for the small | 1 ; This checks the correctness of the lowering code for the small |
| 2 ; integer variants of sdiv and srem. | 2 ; integer variants of sdiv and srem. |
| 3 | 3 |
| 4 ; RUN: %p2i -i %s --assemble --disassemble --args -O2 --verbose none \ | 4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s |
| 5 ; RUN: | FileCheck %s | 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 | FileCheck %s |
| 6 ; RUN: %p2i -i %s --assemble --disassemble --args -Om1 --verbose none \ | |
| 7 ; RUN: | FileCheck %s | |
| 8 | 6 |
| 9 define i32 @sdiv_i8(i32 %a.i32, i32 %b.i32) { | 7 define i32 @sdiv_i8(i32 %a.i32, i32 %b.i32) { |
| 10 entry: | 8 entry: |
| 11 %a = trunc i32 %a.i32 to i8 | 9 %a = trunc i32 %a.i32 to i8 |
| 12 %b = trunc i32 %b.i32 to i8 | 10 %b = trunc i32 %b.i32 to i8 |
| 13 %res = sdiv i8 %a, %b | 11 %res = sdiv i8 %a, %b |
| 14 %res.i32 = zext i8 %res to i32 | 12 %res.i32 = zext i8 %res to i32 |
| 15 ret i32 %res.i32 | 13 ret i32 %res.i32 |
| 16 ; CHECK-LABEL: sdiv_i8 | 14 ; CHECK-LABEL: sdiv_i8 |
| 17 ; CHECK: cbw | 15 ; CHECK: cbw |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 62 } |
| 65 | 63 |
| 66 define i32 @srem_i32(i32 %a, i32 %b) { | 64 define i32 @srem_i32(i32 %a, i32 %b) { |
| 67 entry: | 65 entry: |
| 68 %res = srem i32 %a, %b | 66 %res = srem i32 %a, %b |
| 69 ret i32 %res | 67 ret i32 %res |
| 70 ; CHECK-LABEL: srem_i32 | 68 ; CHECK-LABEL: srem_i32 |
| 71 ; CHECK: cdq | 69 ; CHECK: cdq |
| 72 ; CHECK: idiv | 70 ; CHECK: idiv |
| 73 } | 71 } |
| OLD | NEW |