[llvm] r325578 - [VectorLegalizer] Fix uint64_t typo in ExpandUINT_TO_FLOAT (PR36391)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 05:24:24 PST 2018
Author: rksimon
Date: Tue Feb 20 05:24:24 2018
New Revision: 325578
URL: http://llvm.org/viewvc/llvm-project?rev=325578&view=rev
Log:
[VectorLegalizer] Fix uint64_t typo in ExpandUINT_TO_FLOAT (PR36391)
ExpandUINT_TO_FLOAT can accept vXi32 or vXi64 inputs, so we need to use a uint64_t shift to generate the 2^(BW/2) constant.
No test case unfortunately as no upstream target uses this, but its affecting a downstream target.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp?rev=325578&r1=325577&r2=325578&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp Tue Feb 20 05:24:24 2018
@@ -991,7 +991,7 @@ SDValue VectorLegalizer::ExpandUINT_TO_F
SDValue HalfWordMask = DAG.getConstant(HWMask, DL, VT);
// Two to the power of half-word-size.
- SDValue TWOHW = DAG.getConstantFP(1 << (BW / 2), DL, Op.getValueType());
+ SDValue TWOHW = DAG.getConstantFP(1ULL << (BW / 2), DL, Op.getValueType());
// Clear upper part of LO, lower HI
SDValue HI = DAG.getNode(ISD::SRL, DL, VT, Op.getOperand(0), HalfWord);
More information about the llvm-commits
mailing list