re PR tree-optimization/65215 (Bswap load miscompilation)
authorJakub Jelinek <jakub@redhat.com>
Thu, 26 Feb 2015 21:01:59 +0000 (22:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 26 Feb 2015 21:01:59 +0000 (22:01 +0100)
commit5c2766c1a7a6ecf866d4aaa72e2e2a497fcc7995
tree86a2f160641fe594a9c3923f37dc58e31456bcc2
parent890d89bcd74358bf0063635dc45571ed25ad2f93
re PR tree-optimization/65215 (Bswap load miscompilation)

PR tree-optimization/65215
* tree-ssa-math-opts.c (find_bswap_or_nop_load): Return false
for PDP endian targets.
(perform_symbolic_merge, find_bswap_or_nop_1, find_bswap_or_nop):
Fix up formatting issues.
(bswap_replace): Likewise.  For BYTES_BIG_ENDIAN, if the final access
size is smaller than the original, adjust MEM_REF offset by the
difference of sizes.  Use is_gimple_mem_ref_addr instead of
is_gimple_min_invariant test to avoid adding address temporaries.

* gcc.c-torture/execute/pr65215-1.c: New test.
* gcc.c-torture/execute/pr65215-2.c: New test.
* gcc.c-torture/execute/pr65215-3.c: New test.
* gcc.c-torture/execute/pr65215-4.c: New test.
* gcc.c-torture/execute/pr65215-5.c: New test.

From-SVN: r221033
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr65215-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr65215-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr65215-3.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr65215-4.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr65215-5.c [new file with mode: 0644]
gcc/tree-ssa-math-opts.c