diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
| commit | 5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch) | |
| tree | a6140557876943cdd800ee997c9317283394b22c /test/CodeGen/SystemZ/vec-extract-02.ll | |
| parent | f03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/SystemZ/vec-extract-02.ll')
| -rw-r--r-- | test/CodeGen/SystemZ/vec-extract-02.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/vec-extract-02.ll b/test/CodeGen/SystemZ/vec-extract-02.ll new file mode 100644 index 000000000000..c91e852fcf45 --- /dev/null +++ b/test/CodeGen/SystemZ/vec-extract-02.ll @@ -0,0 +1,15 @@ +; Verify ReplaceExtractVectorEltOfLoadWithNarrowedLoad fixes +; +; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s + +; Test a case where a vector extraction can be simplified to a scalar load. +; The index must be extended from i32 to i64. +define i32 @f1(<4 x i32> *%ptr, i32 %index) { +; CHECK-LABEL: f1: +; CHECK: risbg {{%r[0-5]}}, %r3, 30, 189, 2 +; CHECK: l %r2, +; CHECK: br %r14 + %vec = load <4 x i32>, <4 x i32> *%ptr + %res = extractelement <4 x i32> %vec, i32 %index + ret i32 %res +} |
