[llvm] [IR] Add zext nneg flag (PR #67982)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 10:17:37 PDT 2023


goldsteinn wrote:

> The main disadvantage to `zext nneg` I see is that zext continues to be "privileged" as our choice of canonicalization. Optimizations expecting a zext can just look for a zext. Optimizations expecting an sext may have to look for a "sext or zext nneg".
> 
This seems easy enough to fix with a new pattern `m_SExtLike`. Few transforms actually check that opcode is `sext` and those could almost certainly be refactored relatively easily.

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


More information about the llvm-commits mailing list