[llvm] [InstCombine] Fix fail to fold (A >> C1) Pred C2 if shr is used multple times #83430 (PR #83563)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 14:17:47 PST 2024


aemerson wrote:

> Since matchSelectPattern is failing to check for the minimax pattern, it raises the question of whether the issue lies with matchSelectPattern or if there is a need to implement additional functionality to correctly identify the minimax pattern. Could you provide some guidance or hints to help me begin investigating this matter?

You'll have to just step through it in a debugger to see why it fails to detect. I would guess that the minmax patterns relies on some more simplifications to have happened first. The whole instcombine visitation ordering issue is very tricky.

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


More information about the llvm-commits mailing list