[Bug target/68879] PowerPC: SImode cstore optimisation produces bad code

2015-12-14 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68879

--- Comment #2 from Segher Boessenkool  ---
Author: segher
Date: Mon Dec 14 16:13:33 2015
New Revision: 231621

URL: https://gcc.gnu.org/viewcvs?rev=231621=gcc=rev
Log:
rs6000: Fix a mistake in cstore_si_as_di (PR68865, PR68879)

convert_move does not know how to zero-extend a constant integer to the
target mode -- simply because it does not know the source mode.  As a
result, 32-bit SImode with the high bit set would be effectively sign-
extended instead of zero-extended.

This patch fixes it.


PR target/68865
PR target/68879
* config/rs6000/rs6000.md (cstore_si_as_di): Force all operands
into registers.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.md

[Bug target/68879] PowerPC: SImode cstore optimisation produces bad code

2015-12-12 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68879

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Segher Boessenkool  ---
Dup.

*** This bug has been marked as a duplicate of bug 68865 ***