[llvm] r286473 - Use common SDLoc. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 08:47:10 PST 2016
Author: rksimon
Date: Thu Nov 10 10:47:09 2016
New Revision: 286473
URL: http://llvm.org/viewvc/llvm-project?rev=286473&view=rev
Log:
Use common SDLoc. NFCI.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=286473&r1=286472&r2=286473&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Nov 10 10:47:09 2016
@@ -6777,15 +6777,15 @@ SDValue DAGCombiner::visitANY_EXTEND(SDN
N0.getOperand(1).getOpcode() == ISD::Constant &&
!TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(),
N0.getValueType())) {
+ SDLoc DL(N);
SDValue X = N0.getOperand(0).getOperand(0);
if (X.getValueType().bitsLT(VT)) {
- X = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), VT, X);
+ X = DAG.getNode(ISD::ANY_EXTEND, DL, VT, X);
} else if (X.getValueType().bitsGT(VT)) {
- X = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, X);
+ X = DAG.getNode(ISD::TRUNCATE, DL, VT, X);
}
APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
Mask = Mask.zext(VT.getSizeInBits());
- SDLoc DL(N);
return DAG.getNode(ISD::AND, DL, VT,
X, DAG.getConstant(Mask, DL, VT));
}
More information about the llvm-commits
mailing list