[llvm] [SCCP] Refine trunc with nsw/nuw flags (PR #87926)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 03:58:39 PDT 2024


nikic wrote:

> LGTM. BTW, as adding poison-generating flags blocks `logical and/or -> bitwise and/or`, should we take context information into account in `canCreateUndefOrPoison`?

Can you clarify what you mean by "take context information into account" here?

Generally, I think it's more important to make transforms work with the logical form than improve logical -> bitwise conversion. I wouldn't consider the conversion itself not happening a significant regression, only if this disables downstream optimizations.

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


More information about the llvm-commits mailing list