rs6000: Optimise SImode cstore on 64-bit
commit32cbdfc447c3a2cc1aba19a5fbee87ebc8868b22
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Dec 2015 10:56:15 +0000 (2 10:56 +0000)
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Dec 2015 10:56:15 +0000 (2 10:56 +0000)
tree91068602631c3d28713bc7e74bbf6d0319a4358c
parentacbb264c8805485d874f3ff89697e030432076b0
rs6000: Optimise SImode cstore on 64-bit

On 64-bit we can do comparisons of 32-bit values by extending those
values to 64-bit, subtracting them, and then getting the high bit of
the result.  For registers this is always cheaper than using the carry
bit sequence; and if the comparison involves a constant, this is cheaper
than the sequence we previously generated in half of the cases (and the
same cost in the other cases).

After this, the only sequence left that is using the mfcr insn is the
one doing signed comparison of Pmode registers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231165 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/rs6000/rs6000.md