summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2007-10-07 11:45:55 +0000
committerNeil Booth <neil@daikokuya.co.uk>2007-10-07 11:45:55 +0000
commit5f00973393f24c093c5631b3a662cca54f777e49 (patch)
tree23358596dcd3b0a1dff45ad642f1dc9a43de2616 /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
parentc330d008f48a3a7a396743f4cf4bdebbdafa8ba7 (diff)
downloadbcm5719-llvm-5f00973393f24c093c5631b3a662cca54f777e49.tar.gz
bcm5719-llvm-5f00973393f24c093c5631b3a662cca54f777e49.zip
convertFromInteger, as originally written, expected sign-extended
input. APInt unfortunately zero-extends signed integers, so Dale modified the function to expect zero-extended input. Make this assumption explicit in the function name. llvm-svn: 42732
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index a928968ef90..09f45d2ce7e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3234,8 +3234,8 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
const uint64_t zero[] = {0, 0};
APFloat apf = APFloat(APInt(MVT::getSizeInBits(VT), 2, zero));
uint64_t x = 1ULL << ShiftAmt;
- (void)apf.convertFromInteger(&x, MVT::getSizeInBits(NVT), false,
- APFloat::rmNearestTiesToEven);
+ (void)apf.convertFromZeroExtendedInteger
+ (&x, MVT::getSizeInBits(NVT), false, APFloat::rmNearestTiesToEven);
Tmp2 = DAG.getConstantFP(apf, VT);
Tmp3 = DAG.getSetCC(TLI.getSetCCResultTy(),
Node->getOperand(0), Tmp2, ISD::SETLT);
OpenPOWER on IntegriCloud