https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117821
--- Comment #3 from Daniel Henrique Barboza <daniel.barboza at oss dot qualcomm.com> --- (In reply to Daniel Henrique Barboza from comment #2) > This one is close to 126523 which I have a patch in the ML already so I'll > take a look. > > I am assuming that by "the ~ should prop over the truncation" you mean > transforming f2 into f1, i.e. truncate first then do the neg. Just tried that in aarch64 (turned f2 into f1) and it generated worse code. If we do f1 -> f2 the generated code is better. So I'll assume that the original idea was turning f1 into f2. What I thought back there is bogus because the truncation needs to be explicit (i.e. a bit_and and then the bit_not) while the other way around we can just do the bit_not and the truncation is done by how the value is read. I'll make the other optimizations a bit simpler too.
