[PATCH] D130642: [GlobalISel] Handle IntToPtr constants in dbg.value

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 09:51:32 PDT 2022


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

Thanks! LGTM with the one inline comment addressed.



================
Comment at: llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp:112
       MIB.addImm(CI->getZExtValue());
-  } else if (auto *CFP = dyn_cast<ConstantFP>(&C)) {
+  } else if (auto *CFP = dyn_cast<ConstantFP>(NumericConstant)) {
     MIB.addFPImm(CFP);
----------------
1. I don't think this code path is tested?
2. Is this `inttoptr(float)` actually legal LLVM IR?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130642/new/

https://reviews.llvm.org/D130642



More information about the llvm-commits mailing list