Quoting David Kastrup <d...@gnu.org>:
The optimizer does not appear interested in the result of the comparison
when calculating the minimum value! There is no conditional path
entered. That does not make all too much sense.
That's a truly sharp eye!
A diff between the i386 assembly without -fno-tree-vrp and with
-fno-tree-vrp has following telltale lines:
<----->call<-->_ZN6Moment7compareERKS_S1_@PLT<>#
-.LVL11:
-.LBE73:
+.LVL9:
.LBE72:
.LBE71:
+<----->testl<->%eax, %eax<----># D.35568
+<----->movl<-->%esi, %eax<----># <retval>, D.35564
+<----->cmovns<>%edi, %eax<----># tmp88,, D.35564
cmovns is "conditional move if not sign", exactly what we want. There
is no similar code in the plain -O2 version.
--
Regards,
Pavel Roskin
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel