[Bug tree-optimization/88240] [8/9/10 Regression] Potential optimization bug: invalid pre-load of floating-point value could cause SIGFPE-underflow if value is integer

2020-09-01 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88240

--- Comment #19 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:7442a775817db6065b8eed4d9d9f57611c7d09aa

commit r10-8695-g7442a775817db6065b8eed4d9d9f57611c7d09aa
Author: Richard Biener 
Date:   Tue Aug 4 14:10:45 2020 +0200

tree-optimization/88240 - stopgap for floating point code-hoisting issues

This adds a stopgap measure to avoid performing code-hoisting
on mixed type loads when the load we'd insert in the hoisting
position would be a floating point one.  This is because certain
targets (hello x87) cannot perform floating point loads without
possibly altering the bit representation and thus cannot be used
in place of integral loads.

2020-08-04  Richard Biener  

PR tree-optimization/88240
* tree-ssa-sccvn.h (vn_reference_s::punned): New flag.
* tree-ssa-sccvn.c (vn_reference_insert): Initialize punned.
(vn_reference_insert_pieces): Likewise.
(visit_reference_op_call): Likewise.
(visit_reference_op_load): Track whether a ref was punned.
* tree-ssa-pre.c (do_hoist_insertion): Refuse to perform hoist
insertion on punned floating point loads.

* gcc.target/i386/pr88240.c: New testcase.

(cherry picked from commit 1af5cdd77985daf76130f527deac425c43df9f49)

[Bug tree-optimization/88240] [8/9/10 Regression] Potential optimization bug: invalid pre-load of floating-point value could cause SIGFPE-underflow if value is integer

2020-08-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88240

Richard Biener  changed:

   What|Removed |Added

Summary|[8/9/10/11 Regression]  |[8/9/10 Regression]
   |Potential optimization bug: |Potential optimization bug:
   |invalid pre-load of |invalid pre-load of
   |floating-point value could  |floating-point value could
   |cause SIGFPE-underflow if   |cause SIGFPE-underflow if
   |value is integer|value is integer
 Blocks|96457   |

--- Comment #18 from Richard Biener  ---
So this is a reasonable stop-gap solution for branches, now also pushed to
trunk.  I'll see if I can come up with something more sensible for trunk.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96457
[Bug 96457] PRE gets confused by punned load handling

[Bug tree-optimization/88240] [8/9/10 Regression] Potential optimization bug: invalid pre-load of floating-point value could cause SIGFPE-underflow if value is integer

2020-03-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88240

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.4 |8.5

--- Comment #15 from Jakub Jelinek  ---
GCC 8.4.0 has been released, adjusting target milestone.