diff options
author | Mon P Wang <wangmp@apple.com> | 2010-02-01 19:03:18 +0000 |
---|---|---|
committer | Mon P Wang <wangmp@apple.com> | 2010-02-01 19:03:18 +0000 |
commit | c6654ec498698919ae8388c53fe91d0366ac24c7 (patch) | |
tree | c3608b4f5d1cf0405958b6e73288a8c83a750884 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | a00ef1122c6364c7f54a1c428654fea5d9097e56 (diff) | |
download | external_llvm-c6654ec498698919ae8388c53fe91d0366ac24c7.zip external_llvm-c6654ec498698919ae8388c53fe91d0366ac24c7.tar.gz external_llvm-c6654ec498698919ae8388c53fe91d0366ac24c7.tar.bz2 |
Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result
type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can
be used to extended the width of an integer type. This fixes a bug for
Generic/vector-casts.ll on a ppc750.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 4f26cde..2e92f8f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2765,7 +2765,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, EVT VT, // operations are lowered to scalars. if (N1.getOpcode() == ISD::INSERT_VECTOR_ELT) { // If the indices are the same, return the inserted element. - if (N1.getOperand(2) == N2) + if (N1.getOperand(2) == N2 && VT == N1.getOperand(1).getValueType()) return N1.getOperand(1); // If the indices are known different, extract the element from // the original vector. |