[llvm] [InstCombine] Fold `(add X, (sext/zext (icmp eq X, C)))` (PR #93840)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 11:19:31 PDT 2024
dtcxzyw wrote:
> > The IR diff LGTM. And there is no extra space for us to generalize this pattern (e.g., add->sub, eq -> ne) :)
>
> What do you mean there is no extra space for us the generalize?
Both `(sub X, (sext/zext (icmp eq X, C)))` and `(add X, (sext/zext (icmp ne X, C)))` are not canonical forms.
https://github.com/llvm/llvm-project/pull/93840
More information about the llvm-commits
mailing list