From: Simon Pilgrim Date: Tue, 20 Feb 2018 13:24:24 +0000 (+0000) Subject: [VectorLegalizer] Fix uint64_t typo in ExpandUINT_TO_FLOAT (PR36391) X-Git-Tag: android-x86-7.1-r4~4777 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c9d87a17ca4eca687011ed6519b2fc07e835bd0e;p=android-x86%2Fexternal-llvm.git [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325578 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index eda73dbec4c..6d1a419adc6 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -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);