forked from OSchip/llvm-project
Check that both operands are f32 before attempting to lower.
llvm-svn: 56036
This commit is contained in:
parent
648930b9ba
commit
eb1db169bf
|
@ -3409,6 +3409,7 @@ SelectionDAGLowering::visitPow(CallInst &I) {
|
||||||
bool IsExp10 = false;
|
bool IsExp10 = false;
|
||||||
|
|
||||||
if (getValue(Val).getValueType() == MVT::f32 &&
|
if (getValue(Val).getValueType() == MVT::f32 &&
|
||||||
|
getValue(I.getOperand(2)).getValueType() == MVT::f32 &&
|
||||||
LimitFloatPrecision > 0 && LimitFloatPrecision <= 18) {
|
LimitFloatPrecision > 0 && LimitFloatPrecision <= 18) {
|
||||||
if (Constant *C = const_cast<Constant*>(dyn_cast<Constant>(Val))) {
|
if (Constant *C = const_cast<Constant*>(dyn_cast<Constant>(Val))) {
|
||||||
if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
|
if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
|
||||||
|
|
Loading…
Reference in New Issue