diff options
author | Martin Jambor <mjambor@suse.cz> | 2024-08-21 14:49:11 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2024-08-21 14:49:29 +0200 |
commit | f577959f420ae404f99f630dadc1c0370734d0da (patch) | |
tree | eb0a4fd2107ef624e954a4884f0b361d37fc3fd8 /libcpp | |
parent | af0d2d95a5f767d92bd64f959679fb4612247b0b (diff) | |
download | gcc-f577959f420ae404f99f630dadc1c0370734d0da.zip gcc-f577959f420ae404f99f630dadc1c0370734d0da.tar.gz gcc-f577959f420ae404f99f630dadc1c0370734d0da.tar.bz2 |
sra: Avoid risking x87 magling binary representation of a replacement (PR 58416)
PR 58416 shows that storing non-floating point data to floating point
scalar registers can lead to miscompilations when the data is
normalized or otherwise processed upon loading to a register. To
avoid that risk, this patch detects situations where we have multiple
types and a we decide to represent the data in a type with a mode that
is known to not be able to transfer actual bits reliably using the new
TARGET_MODE_CAN_TRANSFER_BITS hook.
gcc/ChangeLog:
2024-08-19 Martin Jambor <mjambor@suse.cz>
PR target/58416
* tree-sra.cc (types_risk_mangled_binary_repr_p): New function.
(sort_and_splice_var_accesses): Use it.
(propagate_subaccesses_from_rhs): Likewise.
gcc/testsuite/ChangeLog:
2024-08-19 Martin Jambor <mjambor@suse.cz>
PR target/58416
* gcc.dg/torture/pr58416.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions