[llvm] [InstCombine] Simplify nested selects with implied condition (PR #83739)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 07:40:56 PST 2024
dtcxzyw wrote:
> This looks basically fine, but I think it may subsume some existing folds?
>
> For example, what about this one?
>
> https://github.com/llvm/llvm-project/blob/27ce5121ee875c337dd0f977b00afcb756977f62/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp#L3646-L3651
>
> There's also foldAndOrOfSelectUsingImpliedCond() -- I think your fold may be the same, but without the limitation that the top-level select is a logical one?
We can further remove the following logic if we fold it recursively.
https://github.com/llvm/llvm-project/blob/d0521484c854adf082936824c99f9db101363cb8/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp#L3682-L3723
https://github.com/llvm/llvm-project/pull/83739
More information about the llvm-commits
mailing list