From 277fc24a7c19aba06fa9d268c5a09a366acf7875 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 10 Sep 2008 00:24:59 +0000 Subject: [PATCH] Check that both operands are f32 before attempting to lower. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56036 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index ddf006677e6..c53d63e6947 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -3409,6 +3409,7 @@ SelectionDAGLowering::visitPow(CallInst &I) { bool IsExp10 = false; if (getValue(Val).getValueType() == MVT::f32 && + getValue(I.getOperand(2)).getValueType() == MVT::f32 && LimitFloatPrecision > 0 && LimitFloatPrecision <= 18) { if (Constant *C = const_cast(dyn_cast(Val))) { if (ConstantFP *CFP = dyn_cast(C)) {