OLD | NEW |
(Empty) | |
| 1 ; This test checks support for vector arithmetic. |
| 2 |
| 3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
| 4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s |
| 5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
| 7 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
| 8 ; RUN: | FileCheck --check-prefix=DUMP %s |
| 9 |
| 10 define <4 x float> @test_fadd(<4 x float> %arg0, <4 x float> %arg1) { |
| 11 entry: |
| 12 %res = fadd <4 x float> %arg0, %arg1 |
| 13 ret <4 x float> %res |
| 14 ; CHECK-LABEL: test_fadd: |
| 15 ; CHECK: addps |
| 16 } |
| 17 |
| 18 define <4 x float> @test_fsub(<4 x float> %arg0, <4 x float> %arg1) { |
| 19 entry: |
| 20 %res = fsub <4 x float> %arg0, %arg1 |
| 21 ret <4 x float> %res |
| 22 ; CHECK-LABEL: test_fsub: |
| 23 ; CHECK: subps |
| 24 } |
| 25 |
| 26 define <4 x float> @test_fmul(<4 x float> %arg0, <4 x float> %arg1) { |
| 27 entry: |
| 28 %res = fmul <4 x float> %arg0, %arg1 |
| 29 ret <4 x float> %res |
| 30 ; CHECK-LABEL: test_fmul: |
| 31 ; CHECK: mulps |
| 32 } |
| 33 |
| 34 define <4 x float> @test_fdiv(<4 x float> %arg0, <4 x float> %arg1) { |
| 35 entry: |
| 36 %res = fdiv <4 x float> %arg0, %arg1 |
| 37 ret <4 x float> %res |
| 38 ; CHECK-LABEL: test_fdiv: |
| 39 ; CHECK: divps |
| 40 } |
| 41 |
| 42 define <4 x float> @test_frem(<4 x float> %arg0, <4 x float> %arg1) { |
| 43 entry: |
| 44 %res = frem <4 x float> %arg0, %arg1 |
| 45 ret <4 x float> %res |
| 46 ; CHECK-LABEL: test_frem: |
| 47 ; CHECK: __frem_v4f32 |
| 48 } |
| 49 |
| 50 ; ERRORS-NOT: ICE translation error |
| 51 ; DUMP-NOT: SZ |
OLD | NEW |