[llvm] [DebugInfo][SpeculativeExecution] Drop the debug location of the hoisted instruction (PR #97384)

Shan Huang via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 08:31:30 PDT 2024


Apochens wrote:

> Although the test contains a conditional branch on a constant value (so, a round-about unconditional branch), I'm right in thinking we might hoist instructions here even if there are (runtime-) conditional branches too?

@OCHyams Your concern is reasonable. For this, I modified the constant value in the conditional branch, and the optimization result showed that the `add` instruction is still hoisted. Check [this](https://godbolt.org/z/v5dfTWWWE).

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


More information about the llvm-commits mailing list