From 12b3d433600d1f0dc46372ad8fdf1518c0b183f3 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 30 Aug 2019 13:30:37 +0000 Subject: [PATCH] [DAGCombine] visitVSELECT - use getShiftAmountTy for shift amounts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370471 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index e22bd48fe64..d06fc7a3d66 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -8715,9 +8715,9 @@ SDValue DAGCombiner::visitVSELECT(SDNode *N) { if (TLI.isOperationLegalOrCustom(ISD::ABS, VT)) return DAG.getNode(ISD::ABS, DL, VT, LHS); - SDValue Shift = DAG.getNode( - ISD::SRA, DL, VT, LHS, - DAG.getConstant(VT.getScalarSizeInBits() - 1, DL, VT)); + SDValue Shift = DAG.getNode(ISD::SRA, DL, VT, LHS, + DAG.getConstant(VT.getScalarSizeInBits() - 1, + DL, getShiftAmountTy(VT))); SDValue Add = DAG.getNode(ISD::ADD, DL, VT, LHS, Shift); AddToWorklist(Shift.getNode()); AddToWorklist(Add.getNode()); -- 2.50.1