[llvm] [IPSCCP] Variable not visible at Og: (PR #77901)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 08:09:09 PDT 2024


================
@@ -3594,7 +3594,8 @@ 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.isFloatTy() || Ty.isDoubleTy() || Ty.isHalfTy() || Ty.isBFloatTy())) {
----------------
SLTozer wrote:

The FP value is being bitcast to an int value, so that it can appear in a DWARF expression. To the question about how debug info handles it, my understanding at the moment is that it's up to the consumer. I don't know specifically how different float types of the same size are handled in most debuggers, but there's not much more we can do from this side than provide a bit value and the variable's type AFAICT.

https://github.com/llvm/llvm-project/pull/77901


More information about the llvm-commits mailing list