[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 14 14:45:31 PDT 2024


goldsteinn wrote:

> I don't think we really have a strong motivation for this change beyond "having a canonical form is usually good", so if it's causing issues for some targets, then probably just not doing it is fine. But if we do want to keep it, then yeah, this would be a reasonable motivation for adding the nneg flag.

I don't have any strong preference. I think there is some value in this change so I'm slightly in favor of adding `nneg`.
Letting the chips fall where they may, when some backends can have `ui` preference, doesn't really seem that
great either. But, I have no problem reverting this if thats the sentiment of the room.

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


More information about the cfe-commits mailing list