From c784e5451b29545e2fb450cc590410c0914bb849 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 22 Jan 2020 13:47:58 +0000 Subject: [PATCH] Use SelectionDAG::getShiftAmountConstant(). NFCI. --- llvm/lib/Target/X86/X86ISelLowering.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 2deb839f54f3..cebb4e20e59f 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -28808,7 +28808,6 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N, return; } case ISD::ABS: { - const TargetLowering &TLI = DAG.getTargetLoweringInfo(); assert(N->getValueType(0) == MVT::i64 && "Unexpected type (!= i64) on ABS."); MVT HalfT = MVT::i32; @@ -28821,8 +28820,7 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N, DAG.getConstant(1, dl, HalfT)); Tmp = DAG.getNode( ISD::SRA, dl, HalfT, Hi, - DAG.getConstant(HalfT.getSizeInBits() - 1, dl, - TLI.getShiftAmountTy(HalfT, DAG.getDataLayout()))); + DAG.getShiftAmountConstant(HalfT.getSizeInBits() - 1, HalfT, dl)); Lo = DAG.getNode(ISD::UADDO, dl, VTList, Tmp, Lo); Hi = DAG.getNode(ISD::ADDCARRY, dl, VTList, Tmp, Hi, SDValue(Lo.getNode(), 1));