OSDN Git Service

[VectorLegalizer] Fix uint64_t typo in ExpandUINT_TO_FLOAT (PR36391)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 20 Feb 2018 13:24:24 +0000 (13:24 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 20 Feb 2018 13:24:24 +0000 (13:24 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325578 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp

index eda73db..6d1a419 100644 (file)
@@ -991,7 +991,7 @@ SDValue VectorLegalizer::ExpandUINT_TO_FLOAT(SDValue Op) {
   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);