diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-21 06:57:07 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-21 06:57:07 +0000 |
commit | f03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (patch) | |
tree | 311f96478e9fceea407d1f187f9c5cef712f796e /test/CodeGen/X86/lower-vec-shuffle-bug.ll | |
parent | b6bcb9a905dec7821221e8ceaf1504c1f329815e (diff) |
Diffstat (limited to 'test/CodeGen/X86/lower-vec-shuffle-bug.ll')
-rw-r--r-- | test/CodeGen/X86/lower-vec-shuffle-bug.ll | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/CodeGen/X86/lower-vec-shuffle-bug.ll b/test/CodeGen/X86/lower-vec-shuffle-bug.ll new file mode 100644 index 000000000000..5918e8045f62 --- /dev/null +++ b/test/CodeGen/X86/lower-vec-shuffle-bug.ll @@ -0,0 +1,41 @@ +; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s + +define <4 x double> @test1(<4 x double> %A, <4 x double> %B) { +; CHECK-LABEL: test1: +; CHECK: # BB#0: +; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; CHECK-NEXT: retq +entry: + %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 undef, i32 1, i32 undef, i32 5> + ret <4 x double> %0 +} + +define <4 x double> @test2(<4 x double> %A, <4 x double> %B) { +; CHECK-LABEL: test2: +; CHECK: # BB#0: +; CHECK-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 +; CHECK-NEXT: retq +entry: + %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 undef, i32 1, i32 undef, i32 1> + ret <4 x double> %0 +} + +define <4 x double> @test3(<4 x double> %A, <4 x double> %B) { +; CHECK-LABEL: test3: +; CHECK: # BB#0: +; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; CHECK-NEXT: retq +entry: + %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 0, i32 1, i32 undef, i32 5> + ret <4 x double> %0 +} + +define <4 x double> @test4(<4 x double> %A, <4 x double> %B) { +; CHECK-LABEL: test4: +; CHECK: # BB#0: +; CHECK-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 +; CHECK-NEXT: retq +entry: + %0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32> <i32 0, i32 1, i32 undef, i32 1> + ret <4 x double> %0 +} |