john-brawn-arm wrote: > > > * CodeGen part needs `nsz` to fold pattern (uitofp (fptoui x)). > > > > > > Does it? There's no integer value that would result in a signed zero being > > the results of uitofp (or sitofp), so I would expect nsz to not add any > > extra information. > > DAGCombiner tries to fold this pattern to trunc, which may not preserves the > sign of zero, e.g. when x is -0.5.
Ah, looking at foldFPToIntToFP the transform currently depends on the function-level no-signed-zeros-fp-math attribute, and this would allow the instruction to be checked instead. It would be good to have this explained in the PR (and commit) description. https://github.com/llvm/llvm-project/pull/198470 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
