[llvm] [IPSCCP] Variable not visible at Og: (PR #77901)
Carlos Alberto Enciso via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 00:12:34 PDT 2024
================
@@ -3586,10 +3586,13 @@ DIExpression *llvm::getExpressionForConstant(DIBuilder &DIB, const Constant &C,
return createIntegerExpression(C);
auto *FP = dyn_cast<ConstantFP>(&C);
- if (FP && (Ty.isFloatTy() || Ty.isDoubleTy())) {
+ if (FP &&
+ (Ty.isBFloatTy() || Ty.isHalfTy() || Ty.isFloatTy() || Ty.isDoubleTy())) {
const APFloat &APF = FP->getValueAPF();
- return DIB.createConstantValueExpression(
- APF.bitcastToAPInt().getZExtValue());
+ APInt const &API = APF.bitcastToAPInt();
+ if (auto Temp = API.tryZExtValue())
----------------
CarlosAlbertoEnciso wrote:
Good point.
https://github.com/llvm/llvm-project/pull/77901
More information about the llvm-commits
mailing list