| OLD | NEW |
| 1 ; This checks to ensure that Subzero aligns spill slots. | 1 ; This checks to ensure that Subzero aligns spill slots. |
| 2 | 2 |
| 3 ; RUN: %llvm2ice --verbose none %s | FileCheck %s | 3 ; RUN: %llvm2ice --verbose none %s | FileCheck %s |
| 4 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s | 4 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
| 5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 6 | 6 |
| 7 ; The location of the stack slot for a variable is inferred from the | 7 ; The location of the stack slot for a variable is inferred from the |
| 8 ; return sequence. | 8 ; return sequence. |
| 9 | 9 |
| 10 ; In this file, "global" refers to a variable with a live range across | 10 ; In this file, "global" refers to a variable with a live range across |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 entry: | 71 entry: |
| 72 %float.global = sitofp i32 %arg to float | 72 %float.global = sitofp i32 %arg to float |
| 73 call void @ForceXmmSpillsAndUseFloat(float %float.global) | 73 call void @ForceXmmSpillsAndUseFloat(float %float.global) |
| 74 br label %block | 74 br label %block |
| 75 block: | 75 block: |
| 76 %vec.local = insertelement <4 x i32> undef, i32 undef, i32 0 | 76 %vec.local = insertelement <4 x i32> undef, i32 undef, i32 0 |
| 77 call void @ForceXmmSpillsAndUseFloat(float %float.global) | 77 call void @ForceXmmSpillsAndUseFloat(float %float.global) |
| 78 ret <4 x i32> %vec.local | 78 ret <4 x i32> %vec.local |
| 79 ; CHECK-LABEL: align_local_vector_and_global_float: | 79 ; CHECK-LABEL: align_local_vector_and_global_float: |
| 80 ; CHECK: cvtsi2ss xmm0, eax | 80 ; CHECK: cvtsi2ss xmm0, eax |
| 81 ; CHECK-NEXT: movss dword ptr [esp+28], xmm0 | 81 ; CHECK-NEXT: movss dword ptr [esp+{{12|28}}], xmm0 |
| 82 ; CHECK: movups xmm0, xmmword ptr [esp] | 82 ; CHECK: movups xmm0, xmmword ptr [{{esp|esp\+16}}] |
| 83 ; CHECK-NEXT: add esp, 44 | 83 ; CHECK-NEXT: add esp, 44 |
| 84 ; CHECK-NEXT: ret | 84 ; CHECK-NEXT: ret |
| 85 } | 85 } |
| 86 | 86 |
| 87 declare void @ForceXmmSpillsAndUseAlloca(i8*) | 87 declare void @ForceXmmSpillsAndUseAlloca(i8*) |
| 88 declare void @ForceXmmSpillsAndUseFloat(float) | 88 declare void @ForceXmmSpillsAndUseFloat(float) |
| 89 | 89 |
| 90 ; ERRORS-NOT: ICE translation error | 90 ; ERRORS-NOT: ICE translation error |
| OLD | NEW |