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: %p2i -i %s --args -O2 -sz-seed=1 -randomize-regalloc \ |
| 6 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ |
| 8 ; RUN: | FileCheck %s --check-prefix=CHECK_1 |
| 9 ; RUN: %p2i -i %s --args -Om1 -sz-seed=1 -randomize-regalloc \ |
| 10 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 11 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ |
| 12 ; RUN: | FileCheck %s --check-prefix=OPTM1_1 |
| 13 |
| 14 ; Same tests but with a different seed, just to verify randomness. |
| 15 ; RUN: %p2i -i %s --args -O2 -sz-seed=123 -randomize-regalloc \ |
| 16 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 17 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ |
| 18 ; RUN: | FileCheck %s --check-prefix=CHECK_123 |
| 19 ; RUN: %p2i -i %s --args -Om1 -sz-seed=123 -randomize-regalloc \ |
| 20 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 21 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - \ |
| 22 ; RUN: | FileCheck %s --check-prefix=OPTM1_123 |
| 23 |
| 24 define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) { |
| 25 entry: |
| 26 %res = mul <4 x i32> %a, %b |
| 27 ret <4 x i32> %res |
| 28 ; OPTM1_1-LABEL: mul_v4i32: |
| 29 ; OPTM1_1: sub esp, 60 |
| 30 ; OPTM1_1-NEXT: movups xmmword ptr [esp + 32], xmm0 |
| 31 ; OPTM1_1-NEXT: movups xmmword ptr [esp + 16], xmm1 |
| 32 ; OPTM1_1-NEXT: movups xmm0, xmmword ptr [esp + 32] |
| 33 ; OPTM1_1-NEXT: pshufd xmm7, xmmword ptr [esp + 32], 49 |
| 34 ; OPTM1_1-NEXT: pshufd xmm4, xmmword ptr [esp + 16], 49 |
| 35 ; OPTM1_1-NEXT: pmuludq xmm0, xmmword ptr [esp + 16] |
| 36 ; OPTM1_1-NEXT: pmuludq xmm7, xmm4 |
| 37 ; OPTM1_1-NEXT: shufps xmm0, xmm7, -120 |
| 38 ; OPTM1_1-NEXT: pshufd xmm0, xmm0, -40 |
| 39 ; OPTM1_1-NEXT: movups xmmword ptr [esp], xmm0 |
| 40 ; OPTM1_1-NEXT: movups xmm0, xmmword ptr [esp] |
| 41 ; OPTM1_1-NEXT: add esp, 60 |
| 42 ; OPTM1_1-NEXT: ret |
| 43 |
| 44 ; CHECK_1-LABEL: mul_v4i32: |
| 45 ; CHECK_1: movups xmm6, xmm0 |
| 46 ; CHECK_1-NEXT: pshufd xmm0, xmm0, 49 |
| 47 ; CHECK_1-NEXT: pshufd xmm5, xmm1, 49 |
| 48 ; CHECK_1-NEXT: pmuludq xmm6, xmm1 |
| 49 ; CHECK_1-NEXT: pmuludq xmm0, xmm5 |
| 50 ; CHECK_1-NEXT: shufps xmm6, xmm0, -120 |
| 51 ; CHECK_1-NEXT: pshufd xmm6, xmm6, -40 |
| 52 ; CHECK_1-NEXT: movups xmm0, xmm6 |
| 53 ; CHECK_1-NEXT: ret |
| 54 |
| 55 ; OPTM1_123-LABEL: mul_v4i32: |
| 56 ; OPTM1_123: sub esp, 60 |
| 57 ; OPTM1_123-NEXT: movups xmmword ptr [esp + 32], xmm0 |
| 58 ; OPTM1_123-NEXT: movups xmmword ptr [esp + 16], xmm1 |
| 59 ; OPTM1_123-NEXT: movups xmm0, xmmword ptr [esp + 32] |
| 60 ; OPTM1_123-NEXT: pshufd xmm2, xmmword ptr [esp + 32], 49 |
| 61 ; OPTM1_123-NEXT: pshufd xmm6, xmmword ptr [esp + 16], 49 |
| 62 ; OPTM1_123-NEXT: pmuludq xmm0, xmmword ptr [esp + 16] |
| 63 ; OPTM1_123-NEXT: pmuludq xmm2, xmm6 |
| 64 ; OPTM1_123-NEXT: shufps xmm0, xmm2, -120 |
| 65 ; OPTM1_123-NEXT: pshufd xmm0, xmm0, -40 |
| 66 ; OPTM1_123-NEXT: movups xmmword ptr [esp], xmm0 |
| 67 ; OPTM1_123-NEXT: movups xmm0, xmmword ptr [esp] |
| 68 ; OPTM1_123-NEXT: add esp, 60 |
| 69 ; OPTM1_123-NEXT: ret |
| 70 |
| 71 ; CHECK_123-LABEL: mul_v4i32: |
| 72 ; CHECK_123: movups xmm3, xmm0 |
| 73 ; CHECK_123-NEXT: pshufd xmm0, xmm0, 49 |
| 74 ; CHECK_123-NEXT: pshufd xmm7, xmm1, 49 |
| 75 ; CHECK_123-NEXT: pmuludq xmm3, xmm1 |
| 76 ; CHECK_123-NEXT: pmuludq xmm0, xmm7 |
| 77 ; CHECK_123-NEXT: shufps xmm3, xmm0, -120 |
| 78 ; CHECK_123-NEXT: pshufd xmm3, xmm3, -40 |
| 79 ; CHECK_123-NEXT: movups xmm0, xmm3 |
| 80 ; CHECK_123-NEXT: ret |
| 81 } |
| 82 |
| 83 ; ERRORS-NOT: ICE translation error |
| 84 ; DUMP-NOT: SZ |
OLD | NEW |