Chromium Code Reviews| Index: tests_lit/llvm2ice_tests/vector-pool.ll |
| diff --git a/tests_lit/llvm2ice_tests/vector-pool.ll b/tests_lit/llvm2ice_tests/vector-pool.ll |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0db4b8066dce2746319e7229a77bfcbb64a6a8cf |
| --- /dev/null |
| +++ b/tests_lit/llvm2ice_tests/vector-pool.ll |
| @@ -0,0 +1,33 @@ |
| +; This file tests support for vector constant pooling. |
| + |
| +; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
| +; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s |
| +; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| +; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
| + |
| +define <4 x float> @test_v4f32(i32 %arg) { |
|
jvoung (off chromium)
2014/06/26 23:33:46
Might as well check an integer typed const pool va
|
| +entry: |
| + ret <4 x float> <float 4.000000e+00, float 3.000000e+00, float 2.000000e+00, float 1.000000e+00> |
| +} |
| + |
| +; CHECK: .long 0x40800000 |
| +; CHECK-NEXT: .long 0x40400000 |
| +; CHECK-NEXT: .long 0x40000000 |
| +; CHECK-NEXT: .long 0x3f800000 |
| + |
| +define <8 x i1> @test_v4i1(i32 %arg) { |
| +entry: |
| + ret <8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 1, i1 1, i1 1, i1 1> |
| +} |
| + |
| +; CHECK: .short 0x0 |
| +; CHECK-NEXT: .short 0x1 |
| +; CHECK-NEXT: .short 0x0 |
| +; CHECK-NEXT: .short 0x1 |
| +; CHECK-NEXT: .short 0x1 |
| +; CHECK-NEXT: .short 0x1 |
| +; CHECK-NEXT: .short 0x1 |
| +; CHECK-NEXT: .short 0x1 |
| + |
| +; ERRORS-NOT: ICE translation error |
| +; DUMP-NOT: SZ |