| OLD | NEW |
| 1 ; This tries to be a comprehensive test of f32 and f64 convert operations. | 1 ; This tries to be a comprehensive test of f32 and f64 convert operations. |
| 2 ; The CHECK lines are only checking for basic instruction patterns | 2 ; The CHECK lines are only checking for basic instruction patterns |
| 3 ; that should be present regardless of the optimization level, so | 3 ; that should be present regardless of the optimization level, so |
| 4 ; there are no special OPTM1 match lines. | 4 ; there are no special OPTM1 match lines. |
| 5 | 5 |
| 6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s | 6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s |
| 7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s | 7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s |
| 8 | 8 |
| 9 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \ | 9 ; RUN: %if --need=allow_dump --need=target_ARM32 --command %p2i --filetype=asm \ |
| 10 ; RUN: --target arm32 -i %s --args -O2 --skip-unimplemented \ | 10 ; RUN: --target arm32 -i %s --args -O2 --skip-unimplemented \ |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 define internal i32 @doubleToSigned32Const() { | 92 define internal i32 @doubleToSigned32Const() { |
| 93 entry: | 93 entry: |
| 94 %conv = fptosi double 867.5309 to i32 | 94 %conv = fptosi double 867.5309 to i32 |
| 95 ret i32 %conv | 95 ret i32 %conv |
| 96 } | 96 } |
| 97 ; CHECK-LABEL: doubleToSigned32Const | 97 ; CHECK-LABEL: doubleToSigned32Const |
| 98 ; CHECK: cvttsd2si | 98 ; CHECK: cvttsd2si |
| 99 ; ARM32-LABEL: doubleToSigned32Const | 99 ; ARM32-LABEL: doubleToSigned32Const |
| 100 ; ARM32-DAG: movw [[ADDR:r[0-9]+]], #:lower16:.L$ | 100 ; ARM32-DAG: movw [[ADDR:r[0-9]+]], #:lower16:.L$ |
| 101 ; ARM32-DAG: movt [[ADDR]], #:upper16:.L$ | 101 ; ARM32-DAG: movt [[ADDR]], #:upper16:.L$ |
| 102 ; ARM32-DAG: vldr [[DREG:d[0-9]+]], {{\[}}[[ADDR]], #0{{\]}} | 102 ; ARM32-DAG: vldr [[DREG:d[0-9]+]], {{\[}}[[ADDR]]{{\]}} |
| 103 ; ARM32-DAG: vcvt.s32.f64 [[REG:s[0-9]+]], [[DREG]] | 103 ; ARM32-DAG: vcvt.s32.f64 [[REG:s[0-9]+]], [[DREG]] |
| 104 ; ARM32-DAF: vmov {{r[0-9]+}}, [[REG]] | 104 ; ARM32-DAF: vmov {{r[0-9]+}}, [[REG]] |
| 105 | 105 |
| 106 define internal i32 @floatToSigned32(float %a) { | 106 define internal i32 @floatToSigned32(float %a) { |
| 107 entry: | 107 entry: |
| 108 %conv = fptosi float %a to i32 | 108 %conv = fptosi float %a to i32 |
| 109 ret i32 %conv | 109 ret i32 %conv |
| 110 } | 110 } |
| 111 ; CHECK-LABEL: floatToSigned32 | 111 ; CHECK-LABEL: floatToSigned32 |
| 112 ; CHECK: cvttss2si | 112 ; CHECK: cvttss2si |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 %conv = bitcast i64 9035768 to double | 588 %conv = bitcast i64 9035768 to double |
| 589 ret double %conv | 589 ret double %conv |
| 590 } | 590 } |
| 591 ; CHECK-LABEL: int64BitcastToDoubleConst | 591 ; CHECK-LABEL: int64BitcastToDoubleConst |
| 592 ; CHECK: mov | 592 ; CHECK: mov |
| 593 ; ARM32-LABEL: int64BitcastToDoubleConst | 593 ; ARM32-LABEL: int64BitcastToDoubleConst |
| 594 ; ARM32-DAG: movw [[REG0:r[0-9]+]], #57336 | 594 ; ARM32-DAG: movw [[REG0:r[0-9]+]], #57336 |
| 595 ; ARM32-DAG: movt [[REG0]], #137 | 595 ; ARM32-DAG: movt [[REG0]], #137 |
| 596 ; ARM32-DAG: movw [[REG1:r[0-9]+]], #0 | 596 ; ARM32-DAG: movw [[REG1:r[0-9]+]], #0 |
| 597 ; ARM32-DAG: vmov d{{[0-9]+}}, [[REG0]], [[REG1]] | 597 ; ARM32-DAG: vmov d{{[0-9]+}}, [[REG0]], [[REG1]] |
| OLD | NEW |