summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-05-17 08:31:57 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-05-17 08:31:57 +0000
commitd8edb1d5cc9abd5390434233688d179e08b5ef49 (patch)
tree0e69be09102ee22082e77d57551c3005fd13da9b /llvm
parent56a42ebf1550b6a470ca3b2ce93d0a9b8e1ab31c (diff)
downloadbcm5719-llvm-d8edb1d5cc9abd5390434233688d179e08b5ef49.tar.gz
bcm5719-llvm-d8edb1d5cc9abd5390434233688d179e08b5ef49.zip
Fix a bug in PerformEXTRACT_VECTOR_ELTCombine. The code created an ADD SDNode
with two different types, in cases where the index and the ptr had different types. llvm-svn: 131461
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index cb39679e066..ff4a283b583 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -11038,14 +11038,14 @@ static SDValue PerformEXTRACT_VECTOR_ELTCombine(SDNode *N, SelectionDAG &DAG,
UE = Uses.end(); UI != UE; ++UI) {
SDNode *Extract = *UI;
- // Compute the element's address.
+ // cOMpute the element's address.
SDValue Idx = Extract->getOperand(1);
unsigned EltSize =
InputVector.getValueType().getVectorElementType().getSizeInBits()/8;
uint64_t Offset = EltSize * cast<ConstantSDNode>(Idx)->getZExtValue();
SDValue OffsetVal = DAG.getConstant(Offset, TLI.getPointerTy());
- SDValue ScalarAddr = DAG.getNode(ISD::ADD, dl, Idx.getValueType(),
+ SDValue ScalarAddr = DAG.getNode(ISD::ADD, dl, TLI.getPointerTy(),
StackPtr, OffsetVal);
// Load the scalar.
OpenPOWER on IntegriCloud