================ @@ -2538,6 +2538,190 @@ Value *getSalvageOpsForIcmpOp(ICmpInst *Icmp, uint64_t CurrentLocOps, return Icmp->getOperand(0); } +void llvm::tryToSinkInstructionDbgValues( ---------------- minglotus-6 wrote:
The `gep` and `load` sequence doesn't have debug values (so far) so it's not easy to test within this PR. IMO helper functions that handles debug value along instruction sink (e.g. https://github.com/llvm/llvm-project/blob/1752740f4b4b752bbe2987a0de398c6f671ceb71/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp#L4769) will help other passes (e.g., simplify-cfg, etc) that moves instruction around. And test cases can be added for these shared helper functions. https://github.com/llvm/llvm-project/pull/81442 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits