summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2013-10-15 17:51:58 +0000
committerMichael Liao <michael.liao@intel.com>2013-10-15 17:51:58 +0000
commitbfa7b1e6955ce3cc83214c253696470cef6db179 (patch)
tree523f13ce40247817d9ef32978d2fb04343dc8d20 /test/CodeGen/X86
parentdc8c044a9a3e00cab52ca204717de7aee9dab1be (diff)
downloadllvm-bfa7b1e6955ce3cc83214c253696470cef6db179.tar.gz
llvm-bfa7b1e6955ce3cc83214c253696470cef6db179.tar.bz2
llvm-bfa7b1e6955ce3cc83214c253696470cef6db179.tar.xz
Fix PR17546
- Type of index used in extract_vector_elt or insert_vector_elt supposes to be TLI.getVectorIdxTy() which is pointer type on most targets. It'd better to truncate (or zero-extend in case it's changed later) it to mask element type to guarantee they are matching instead of asserting that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r--test/CodeGen/X86/pr17546.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/pr17546.ll b/test/CodeGen/X86/pr17546.ll
new file mode 100644
index 0000000000..174fa5ca3f
--- /dev/null
+++ b/test/CodeGen/X86/pr17546.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s -mtriple=x86_64-linux-gnu -mcpu=core-avx2 | FileCheck %s
+
+define i32 @f_f___un_3C_unf_3E_un_3C_unf_3E_(<8 x i32> %__mask, i64 %BBBB) {
+ %QQQ = trunc i64 %BBBB to i32
+ %1 = extractelement <8 x i32> %__mask, i32 %QQQ
+ ret i32 %1
+}
+
+; CHECK: f_f___un_3C_unf_3E_un_3C_unf_3E_
+; CHECK: ret