summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-03 14:38:24 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-03 14:38:24 +0000
commitbc876df3a5f0f25b7c43a90e4c35f553ca5362df (patch)
treebd314979211e6e1f0c9612cff19ae697bdbc769e /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parentbfdd0f75a855135d48cbfc8834d36bcbedea90ec (diff)
downloadbcm5719-llvm-bc876df3a5f0f25b7c43a90e4c35f553ca5362df.tar.gz
bcm5719-llvm-bc876df3a5f0f25b7c43a90e4c35f553ca5362df.zip
[TargetLowering] ShrinkDemandedConstant - reduce scope of TLO.DAG variable. NFCI.
Only ever used in one block llvm-svn: 359890
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 3515048c7f8..73fda1b7608 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -448,7 +448,6 @@ TargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
/// return true.
bool TargetLowering::ShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
TargetLoweringOpt &TLO) const {
- SelectionDAG &DAG = TLO.DAG;
SDLoc DL(Op);
unsigned Opcode = Op.getOpcode();
@@ -474,8 +473,8 @@ bool TargetLowering::ShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
if (!C.isSubsetOf(Demanded)) {
EVT VT = Op.getValueType();
- SDValue NewC = DAG.getConstant(Demanded & C, DL, VT);
- SDValue NewOp = DAG.getNode(Opcode, DL, VT, Op.getOperand(0), NewC);
+ SDValue NewC = TLO.DAG.getConstant(Demanded & C, DL, VT);
+ SDValue NewOp = TLO.DAG.getNode(Opcode, DL, VT, Op.getOperand(0), NewC);
return TLO.CombineTo(Op, NewOp);
}
OpenPOWER on IntegriCloud