[Bug regression/78982] __builtin_lrintf() not an cvtss2si/vcvtss2si but cvttss2si/vcvttss2si since GCC 6.xx
anty_order at tlen dot pl
gcc-bugzilla@gcc.gnu.org
Wed Jan 4 04:21:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78982
--- Comment #1 from Waldemar Friedrich <anty_order at tlen dot pl> ---
additional info
changing code to
float someFloat = 10*argc;
someFloat+=0.1f;
long someInt = lrintf (someFloat);
does produce cvtss2si/vcvtss2si
but
float someFloat = 10*argc;
someFloat+=2.0f;
long someInt = lrintf (someFloat);
don't
so it looks when it is assumed value is whole integer in nature it is cvttss2si
(truncation) otherwise cvtss2si (rounding)
More information about the Gcc-bugs
mailing list