summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-07-05 18:02:57 +0000
committerTim Northover <tnorthover@apple.com>2016-07-05 18:02:57 +0000
commit01dff9d18a23ef7d413e6d759e01423e4dae24bb (patch)
tree54d9eb994fe12bcb981168036edb2f8c4322ee98 /llvm/lib
parentf1bd000f7153cf608b050214e42475731188febc (diff)
downloadbcm5719-llvm-01dff9d18a23ef7d413e6d759e01423e4dae24bb.tar.gz
bcm5719-llvm-01dff9d18a23ef7d413e6d759e01423e4dae24bb.zip
AArch64: use correct SDValue # when looking for bitfield placement.
The other use really does only care about the SDNode (it checks the opcode against a whitelist), but bitFieldPlacement can be misled if the node produces multiple results. Patch by Ismail Badawi. llvm-svn: 274567
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
index fcca120d885..2e98c41f0e7 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
@@ -2172,7 +2172,8 @@ static bool tryBitfieldInsertOpFromOr(SDNode *N, const APInt &UsefulBits,
SDValue Dst, Src;
unsigned ImmR, ImmS;
bool BiggerPattern = I / 2;
- SDNode *OrOpd0 = N->getOperand(I % 2).getNode();
+ SDValue OrOpd0Val = N->getOperand(I % 2);
+ SDNode *OrOpd0 = OrOpd0Val.getNode();
SDValue OrOpd1Val = N->getOperand((I + 1) % 2);
SDNode *OrOpd1 = OrOpd1Val.getNode();
@@ -2197,7 +2198,7 @@ static bool tryBitfieldInsertOpFromOr(SDNode *N, const APInt &UsefulBits,
// If the mask on the insertee is correct, we have a BFXIL operation. We
// can share the ImmR and ImmS values from the already-computed UBFM.
- } else if (isBitfieldPositioningOp(CurDAG, SDValue(OrOpd0, 0),
+ } else if (isBitfieldPositioningOp(CurDAG, OrOpd0Val,
BiggerPattern,
Src, DstLSB, Width)) {
ImmR = (BitWidth - DstLSB) % BitWidth;
OpenPOWER on IntegriCloud