Fix PR17546
authorMichael Liao <michael.liao@intel.com>
Tue, 15 Oct 2013 17:51:58 +0000 (17:51 +0000)
committerMichael Liao <michael.liao@intel.com>
Tue, 15 Oct 2013 17:51:58 +0000 (17:51 +0000)
commitbfa7b1e6955ce3cc83214c253696470cef6db179
tree523f13ce40247817d9ef32978d2fb04343dc8d20
parentdc8c044a9a3e00cab52ca204717de7aee9dab1be
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
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/pr17546.ll [new file with mode: 0644]