rs6000-p8swap.c (const_load_sequence_p): Revise this function to return false if...
authorKelvin Nilsen <kelvin@gcc.gnu.org>
Wed, 27 Sep 2017 23:43:26 +0000 (23:43 +0000)
committerKelvin Nilsen <kelvin@gcc.gnu.org>
Wed, 27 Sep 2017 23:43:26 +0000 (23:43 +0000)
commit6e0cc90b228ec869440df1028fc39fb0f3c9e028
tree02c3cb0dde03b7281f4e5e47f04596971fe6db71
parent4ca4cf4e420cc817fc66949d4c8069f951d857b4
rs6000-p8swap.c (const_load_sequence_p): Revise this function to return false if the definition used by the swap...

gcc/ChangeLog:

2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
this function to return false if the definition used by the swap
instruction is artificial, or if the memory address from which the
constant value is loaded is not represented by a base address held
in a register or if the base address register is a frame or stack
pointer.  Additionally, return false if the base address of the
loaded constant is a SYMBOL_REF but is not considered to be a
constant.
(replace_swapped_load_constant): New function.
(rs6000_analyze_swaps): Add a new pass to replace a swap of a
loaded constant vector with a load of a swapped constant vector.

gcc/testsuite/ChangeLog:

2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/swaps-p8-28.c: New test.
* gcc.target/powerpc/swaps-p8-29.c: New test.
* gcc.target/powerpc/swaps-p8-30.c: New test.
* gcc.target/powerpc/swaps-p8-31.c: New test.
* gcc.target/powerpc/swaps-p8-32.c: New test.
* gcc.target/powerpc/swaps-p8-33.c: New test.
* gcc.target/powerpc/swaps-p8-34.c: New test.
* gcc.target/powerpc/swaps-p8-35.c: New test.
* gcc.target/powerpc/swaps-p8-36.c: New test.
* gcc.target/powerpc/swaps-p8-37.c: New test.
* gcc.target/powerpc/swaps-p8-38.c: New test.
* gcc.target/powerpc/swaps-p8-39.c: New test.
* gcc.target/powerpc/swaps-p8-40.c: New test.
* gcc.target/powerpc/swaps-p8-41.c: New test.
* gcc.target/powerpc/swaps-p8-42.c: New test.
* gcc.target/powerpc/swaps-p8-43.c: New test.
* gcc.target/powerpc/swaps-p8-44.c: New test.
* gcc.target/powerpc/swaps-p8-45.c: New test.

From-SVN: r253240
21 files changed:
gcc/ChangeLog
gcc/config/rs6000/rs6000-p8swap.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/swaps-p8-28.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-29.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-30.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-31.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-33.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-34.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-35.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-36.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-37.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-38.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-39.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-40.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-41.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-42.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-43.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-44.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/swaps-p8-45.c [new file with mode: 0644]