]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/88240 - stopgap for floating point code-hoisting issues
authorRichard Biener <rguenther@suse.de>
Tue, 4 Aug 2020 12:10:45 +0000 (14:10 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 1 Sep 2020 08:28:14 +0000 (10:28 +0200)
commit7442a775817db6065b8eed4d9d9f57611c7d09aa
treea16ee3832d8f14e5b7da2b5c961afe68c244b9ff
parentfd732eee98b63d957e5a5f5a85ebc2813cdc5c86
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  <rguenther@suse.de>

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)
gcc/testsuite/gcc.target/i386/pr88240.c [new file with mode: 0644]
gcc/tree-ssa-pre.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-sccvn.h