We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16a595e commit be3cef0Copy full SHA for be3cef0
llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp
@@ -101,7 +101,7 @@ class LibCallsShrinkWrap : public InstVisitor<LibCallsShrinkWrap> {
101
float Val) {
102
Constant *V = ConstantFP::get(BBBuilder.getContext(), APFloat(Val));
103
if (!Arg->getType()->isFloatTy())
104
- V = ConstantExpr::getFPExtend(V, Arg->getType());
+ V = ConstantFoldCastInstruction(Instruction::FPExt, V, Arg->getType());
105
if (BBBuilder.GetInsertBlock()->getParent()->hasFnAttribute(Attribute::StrictFP))
106
BBBuilder.setIsFPConstrained(true);
107
return BBBuilder.CreateFCmp(Cmp, Arg, V);
0 commit comments