OLD | NEW |
(Empty) | |
| 1 ; This is a smoke test of randomized register allocation. The output |
| 2 ; of this test will change with changes to the random number generator |
| 3 ; implementation. |
| 4 |
| 5 ; RUN: %llvm2ice -O2 -rng-seed=1 -randomize-regalloc %s \ |
| 6 ; RUN: | FileCheck %s --check-prefix=CHECK |
| 7 ; RUN: %llvm2ice -Om1 -rng-seed=1 -randomize-regalloc %s \ |
| 8 ; RUN: | FileCheck %s --check-prefix=OPTM1 |
| 9 ; RUN: %llvm2ice -O2 -rng-seed=1 -randomize-regalloc %s \ |
| 10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj |
| 11 ; RUN: %llvm2ice -Om1 -rng-seed=1 -randomize-regalloc %s \ |
| 12 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj |
| 13 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 14 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
| 15 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
| 16 ; RUN: | FileCheck --check-prefix=DUMP %s |
| 17 |
| 18 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) { |
| 19 entry: |
| 20 %res = mul <4 x i32> %a, %b |
| 21 ret <4 x i32> %res |
| 22 ; OPTM1-LABEL: mul_v4i32: |
| 23 ; OPTM1: sub esp, 60 |
| 24 ; OPTM1: movups xmmword ptr [esp+32], xmm0 |
| 25 ; OPTM1: movups xmmword ptr [esp+16], xmm1 |
| 26 ; OPTM1: movups xmm7, xmmword ptr [esp+32] |
| 27 ; OPTM1: pshufd xmm0, xmmword ptr [esp+32], 49 |
| 28 ; OPTM1: pshufd xmm1, xmmword ptr [esp+16], 49 |
| 29 ; OPTM1: pmuludq xmm7, xmmword ptr [esp+16] |
| 30 ; OPTM1: pmuludq xmm0, xmm1 |
| 31 ; OPTM1: shufps xmm7, xmm0, 136 |
| 32 ; OPTM1: pshufd xmm2, xmm7, 216 |
| 33 ; OPTM1: movups xmmword ptr [esp], xmm2 |
| 34 ; OPTM1: movups xmm0, xmmword ptr [esp] |
| 35 ; OPTM1: add esp, 60 |
| 36 ; OPTM1: ret |
| 37 |
| 38 ; CHECK-LABEL: mul_v4i32: |
| 39 ; CHECK: movups xmm5, xmm0 |
| 40 ; CHECK: pshufd xmm0, xmm0, 49 |
| 41 ; CHECK: pshufd xmm2, xmm1, 49 |
| 42 ; CHECK: pmuludq xmm5, xmm1 |
| 43 ; CHECK: pmuludq xmm0, xmm2 |
| 44 ; CHECK: shufps xmm5, xmm0, 136 |
| 45 ; CHECK: pshufd xmm0, xmm5, 216 |
| 46 ; CHECK: ret |
| 47 } |
| 48 |
| 49 ; ERRORS-NOT: ICE translation error |
| 50 ; DUMP-NOT: SZ |
OLD | NEW |