[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 11 01:09:02 PDT 2024


nikic wrote:

> > Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use nneg instead of KnownBits after this change?
> 
> yeah we could. Should I do a survey of existing folds first to ensure we don't incorrectly keep flags (like with `trunc nuw/nsw`) before integrating too deeply?

I don't think this is important for uitofp nneg, mainly because we only have very few folds for it, so there's just not a great deal of potential for things to go wrong...

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


More information about the cfe-commits mailing list