Use a legal type for elements of the vector_shuffle
authorDuncan Sands <baldrick@free.fr>
Thu, 17 Jul 2008 19:28:41 +0000 (19:28 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 17 Jul 2008 19:28:41 +0000 (19:28 +0000)
commitf1bb7f1d3e6b06185580ad4b4c343d402bf0a453
tree0082bffb1daf41febcd31307bceb3b2aa15d857e
parente8be6c63915e0389f1eef6b53c64300d13b2ce99
Use a legal type for elements of the vector_shuffle
mask.  These are just indices into the shuffled vector
so their type is unrelated to the type of the
shuffled elements (which is what was being used before).
This fixes vec_shuffle-11.ll when using LegalizeTypes.
What seems to have happened is that Dan's recent change
r53687, which corrected the result type of the shuffle,
somehow caused LegalizeTypes to notice that the mask
operand was a BUILD_VECTOR with a legal type but elements
of an illegal type (i64).  LegalizeTypes legalized this
by introducing a new BUILD_VECTOR of i32 and bitcasting
it to the old type.  But the mask operand is not supposed
to be a bitcast but a straight BUILD_VECTOR of constants,
causing a crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53729 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp