Fix CodeGen/Generic/fpowi-promote.ll and PR1239

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34893 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-03-03 23:43:21 +00:00
parent 4f263a00bf
commit 8b2d42c949

View File

@ -3328,6 +3328,18 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
DAG.getValueType(VT));
break;
case ISD::FPOWI: {
// Promote f32 powi to f64 powi. Note that this could insert a libcall
// directly as well, which may be better.
Tmp1 = PromoteOp(Node->getOperand(0));
assert(Tmp1.getValueType() == NVT);
Result = DAG.getNode(ISD::FPOWI, NVT, Tmp1, Node->getOperand(1));
if (NoExcessFPPrecision)
Result = DAG.getNode(ISD::FP_ROUND_INREG, NVT, Result,
DAG.getValueType(VT));
break;
}
case ISD::AND:
case ISD::OR:
case ISD::XOR: