[llvm] [SCCP] Remove LoadInst if it loaded from Constant GlobalVariable (PR #107245)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 03:03:35 PDT 2024
================
@@ -357,8 +357,11 @@ static bool runIPSCCP(
LLVM_DEBUG(dbgs() << "Found that GV '" << GV->getName()
<< "' is constant!\n");
while (!GV->use_empty()) {
- StoreInst *SI = cast<StoreInst>(GV->user_back());
- SI->eraseFromParent();
+ auto User = GV->user_back();
----------------
ParkHanbum wrote:
thanks for advise!
https://github.com/llvm/llvm-project/pull/107245
More information about the llvm-commits
mailing list