[clang] [llvm] [Transforms][Utils][PromoteMem2Reg] Propagate nnan flag on par with the nsz flag (PR #114271)

Joshua Cranmer via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 11:34:00 PST 2024


jcranmer-intel wrote:

arsenm sums it up quite well, I think.

Personally, I dislike the FMF being on select/phi only somewhat less than I dislike the function-level attributes, and I'd rather avoid needing to use them if there's a better way forward. Because nnan/ninf induce poison, you can get a lot of potential by poison propagation. But nsz doesn't induce poison, and that means that where you have patterns like fabs formation, you need the flag on the select to know that you can change the result of a value which is otherwise unchanged.

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


More information about the cfe-commits mailing list