diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-08-30 13:30:37 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-08-30 13:30:37 +0000 |
commit | 336766966827431d73ddb66c80bdca9d6f50499d (patch) | |
tree | 0cc691b646aa8f34afbc597eae50befd4d00c4cf | |
parent | 8e1989e79a49e9e246a2863ea927fdabaa150e5f (diff) | |
download | bcm5719-llvm-336766966827431d73ddb66c80bdca9d6f50499d.tar.gz bcm5719-llvm-336766966827431d73ddb66c80bdca9d6f50499d.zip |
[DAGCombine] visitVSELECT - use getShiftAmountTy for shift amounts.
llvm-svn: 370471
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index e22bd48fe64..d06fc7a3d66 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/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()); |