[llvm] ValueTracking: strip stray break in recur-match (PR #109794)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 12:25:33 PDT 2024


artagnon wrote:

> This kind of break can be there if we expect a code path to be strictly better. Generally speaking, if we can analyze something as a recurrence, the results we get should always be better than a naive analysis, so falling through to the naive analysis is unnecessary.
> 
> It's just that the exact way this was done here it is not actually true, because we miss the special handling for conditions on the predecessor branch.

This is a good point, but I would have expected the `break` to apply to the shift recurrences as well then? Can we rearrange the code so that the special handling for conditions on the predecessor branch isn't missed, while still squelching the compile-time regression?

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


More information about the llvm-commits mailing list