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 25af06f commit 16a595eCopy full SHA for 16a595e
llvm/lib/Transforms/IPO/Attributor.cpp
@@ -330,7 +330,7 @@ Value *AA::getWithType(Value &V, Type &Ty) {
330
if (C->getType()->isIntegerTy() && Ty.isIntegerTy())
331
return ConstantExpr::getTrunc(C, &Ty, /* OnlyIfReduced */ true);
332
if (C->getType()->isFloatingPointTy() && Ty.isFloatingPointTy())
333
- return ConstantExpr::getFPTrunc(C, &Ty, /* OnlyIfReduced */ true);
+ return ConstantFoldCastInstruction(Instruction::FPTrunc, C, &Ty);
334
}
335
336
return nullptr;
0 commit comments