[llvm] [IPSCCP] Variable not visible at Og: (PR #77901)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 10:05:04 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())) {
----------------
SLTozer wrote:
```suggestion
if (FP && Ty.isFloatingPointTy() && Ty.getScalarSizeInBits() <= 64) {
```
This _could_ be represented with the above instead, which might make the limitation clearer (i.e. size, not FP semantics) to other users - since I don't think it would make any functional change right now though, this is an optional suggestion.
https://github.com/llvm/llvm-project/pull/77901
More information about the llvm-commits
mailing list