diff options
author | Filipe Cabecinhas <me@filcab.net> | 2014-06-22 17:21:37 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2014-06-22 17:21:37 +0000 |
commit | 7798d5992aa8d1bdf96b1c8399d26b6d38a998b5 (patch) | |
tree | 8423e3de48d23bfbea2cb466cc28e14503e69d85 /test/CodeGen | |
parent | fe755c57f8958726b367253d8fe0c8bfb3404351 (diff) | |
download | llvm-7798d5992aa8d1bdf96b1c8399d26b6d38a998b5.tar.gz llvm-7798d5992aa8d1bdf96b1c8399d26b6d38a998b5.tar.bz2 llvm-7798d5992aa8d1bdf96b1c8399d26b6d38a998b5.tar.xz |
Fix PR20087 by using the source index when changing the vector load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/X86/sse41.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/sse41.ll b/test/CodeGen/X86/sse41.ll index a77ede228d..6726a3ea9f 100644 --- a/test/CodeGen/X86/sse41.ll +++ b/test/CodeGen/X86/sse41.ll @@ -703,3 +703,14 @@ define <4 x float> @insertps_with_undefs(<4 x float> %a, float* %b) { %result = shufflevector <4 x float> %a, <4 x float> %2, <4 x i32> <i32 4, i32 undef, i32 0, i32 7> ret <4 x float> %result } + +; Test for a bug in X86ISelLowering.cpp:getINSERTPS where we were using +; the destination index to change the load, instead of the source index. +define <4 x float> @pr20087(<4 x float> %a, <4 x float> *%ptr) { +; CHECK-LABEL: pr20087: +; CHECK: insertps $48 +; CHECK: ret + %load = load <4 x float> *%ptr + %ret = shufflevector <4 x float> %load, <4 x float> %a, <4 x i32> <i32 4, i32 undef, i32 6, i32 2> + ret <4 x float> %ret +} |