mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-16 15:08:59 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131461 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6abb7bae10
commit
86694297ff
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user