summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-11-07 10:14:49 -0500
committerSanjay Patel <spatel@rotateright.com>2019-11-07 10:15:17 -0500
commit2fdd58c5066fc1b13dec39383f17095009131ff8 (patch)
treed6511f87bf68fefee3ed1ef180ce51037354f63f
parent3d30f2cff7a4976a84911748c61de05a43d244e4 (diff)
downloadbcm5719-llvm-2fdd58c5066fc1b13dec39383f17095009131ff8.tar.gz
bcm5719-llvm-2fdd58c5066fc1b13dec39383f17095009131ff8.zip
[SDAG] reduce code duplication; NFC
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 2ded5674bbb..000819b0b6d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -3655,9 +3655,9 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
if ((-AndRHSC).isPowerOf2() && (AndRHSC & C1) == C1) {
unsigned ShiftBits = AndRHSC.countTrailingZeros();
auto &DL = DAG.getDataLayout();
- EVT ShiftTy = getShiftAmountTy(N0.getValueType(), DL,
+ EVT ShiftTy = getShiftAmountTy(ShValTy, DL,
!DCI.isBeforeLegalize());
- EVT CmpTy = N0.getValueType();
+ EVT CmpTy = ShValTy;
SDValue Shift = DAG.getNode(ISD::SRL, dl, CmpTy, N0.getOperand(0),
DAG.getConstant(ShiftBits, dl,
ShiftTy));
@@ -3686,9 +3686,9 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
if (ShiftBits && NewC.getMinSignedBits() <= 64 &&
isLegalICmpImmediate(NewC.getSExtValue())) {
auto &DL = DAG.getDataLayout();
- EVT ShiftTy = getShiftAmountTy(N0.getValueType(), DL,
+ EVT ShiftTy = getShiftAmountTy(ShValTy, DL,
!DCI.isBeforeLegalize());
- EVT CmpTy = N0.getValueType();
+ EVT CmpTy = ShValTy;
SDValue Shift = DAG.getNode(ISD::SRL, dl, CmpTy, N0,
DAG.getConstant(ShiftBits, dl, ShiftTy));
SDValue CmpRHS = DAG.getConstant(NewC, dl, CmpTy);
OpenPOWER on IntegriCloud