aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2020-12-23 16:47:52 +0100
committerUros Bizjak <ubizjak@gmail.com>2020-12-23 16:53:12 +0100
commitc142ae5e17ee3364c281753d7507b3e8a2be9d4f (patch)
tree0530852ace4ddf352e712ef5bff4aec4550ab4c3 /gcc/go
parent544f477536010f055c26bc959b18fccf67902750 (diff)
downloadgcc-c142ae5e17ee3364c281753d7507b3e8a2be9d4f.zip
gcc-c142ae5e17ee3364c281753d7507b3e8a2be9d4f.tar.gz
gcc-c142ae5e17ee3364c281753d7507b3e8a2be9d4f.tar.bz2
i386: Fix __builtin_trunc with FE_DOWNWARD rounding direction [PR96793]
x86_expand_truncdf_32 expander uses x86_sse_copysign_to_positive, which is unable to change the sign from - to +. When FE_DOWNWARD rounding direction is in effect, the expanded sequence that involves subtraction can trigger x - x = -0.0 special rule. x86_sse_copysign_to_positive fails to change the sign of the intermediate value, assumed to always be positive, back to positive. The patch adds one extra fabs that strips the sign from the intermediate value when flag_rounding_math is in effect. 2020-12-23 Uroš Bizjak <ubizjak@gmail.com> gcc/ PR target/96793 * config/i386/i386-expand.c (ix86_expand_truncdf_32): Remove the sign of the intermediate value for flag_rounding_math. gcc/testsuite/ PR target/96793 * gcc.target/i386/pr96793-1.c: New test.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions