| OLD | NEW |
| 1 ; Trivial smoke test of bitcast between integer and FP types. | 1 ; Trivial smoke test of bitcast between integer and FP types. |
| 2 | 2 |
| 3 ; RUN: %llvm2ice --verbose inst %s | FileCheck %s | 3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
| 4 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 4 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 5 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 5 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
| 6 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ | 6 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
| 7 ; RUN: | FileCheck --check-prefix=DUMP %s | 7 ; RUN: | FileCheck --check-prefix=DUMP %s |
| 8 | 8 |
| 9 define internal i32 @cast_f2i(float %f) { | 9 define internal i32 @cast_f2i(float %f) { |
| 10 entry: | 10 entry: |
| 11 %v0 = bitcast float %f to i32 | 11 %v0 = bitcast float %f to i32 |
| 12 ; CHECK: bitcast | |
| 13 ret i32 %v0 | 12 ret i32 %v0 |
| 14 } | 13 } |
| 15 | 14 |
| 15 ; CHECK: mov eax |
| 16 ; CHECK: ret |
| 17 |
| 16 define internal float @cast_i2f(i32 %i) { | 18 define internal float @cast_i2f(i32 %i) { |
| 17 entry: | 19 entry: |
| 18 %v0 = bitcast i32 %i to float | 20 %v0 = bitcast i32 %i to float |
| 19 ; CHECK: bitcast | |
| 20 ret float %v0 | 21 ret float %v0 |
| 21 } | 22 } |
| 22 | 23 |
| 24 ; CHECK: fld dword ptr |
| 25 ; CHECK: ret |
| 26 |
| 23 define internal i64 @cast_d2ll(double %d) { | 27 define internal i64 @cast_d2ll(double %d) { |
| 24 entry: | 28 entry: |
| 25 %v0 = bitcast double %d to i64 | 29 %v0 = bitcast double %d to i64 |
| 26 ; CHECK: bitcast | |
| 27 ret i64 %v0 | 30 ret i64 %v0 |
| 28 } | 31 } |
| 29 | 32 |
| 33 ; CHECK: mov edx |
| 34 ; CHECK: ret |
| 35 |
| 30 define internal double @cast_ll2d(i64 %ll) { | 36 define internal double @cast_ll2d(i64 %ll) { |
| 31 entry: | 37 entry: |
| 32 %v0 = bitcast i64 %ll to double | 38 %v0 = bitcast i64 %ll to double |
| 33 ; CHECK: bitcast | |
| 34 ret double %v0 | 39 ret double %v0 |
| 35 } | 40 } |
| 36 | 41 |
| 42 ; CHECK: fld qword ptr |
| 43 ; CHECK: ret |
| 44 |
| 37 ; ERRORS-NOT: ICE translation error | 45 ; ERRORS-NOT: ICE translation error |
| 38 ; DUMP-NOT: SZ | 46 ; DUMP-NOT: SZ |
| OLD | NEW |