re PR target/24954 (ICE: could not split insn)
authorAlan Modra <amodra@bigpond.net.au>
Tue, 22 Nov 2005 13:00:06 +0000 (13:00 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Tue, 22 Nov 2005 13:00:06 +0000 (23:30 +1030)
PR target/24954
* config/rs6000/predicated.md (easy_vector_constant_add_self): Use
explicit sign extension, not a (char) cast.

From-SVN: r107352

gcc/ChangeLog
gcc/config/rs6000/predicates.md

index fa6a35cba6f252768da91a5710caf5e85b820373..5bc604e36cb6eb443dda6af274ffb67e8afcbfb1 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-22  Alan Modra  <amodra@bigpond.net.au>
+
+       PR target/24954
+       * config/rs6000/predicated.md (easy_vector_constant_add_self): Use
+       explicit sign extension, not a (char) cast.
+
 2005-11-22  Ben Elliston  <bje@au.ibm.com>
 
        * optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing
index 885ac2cf39e45635e4deffb3b373dfc99a1092f1..b9402615cd94991a9f899e690f26f6d050b91de1 100644 (file)
            (match_test "easy_altivec_constant (op, mode)")))
 {
   rtx last = CONST_VECTOR_ELT (op, GET_MODE_NUNITS (mode) - 1);
-  HOST_WIDE_INT val = (char) (INTVAL (last) & 255);
+  HOST_WIDE_INT val = ((INTVAL (last) & 0xff) ^ 0x7f) - 0x7f;
   return EASY_VECTOR_15_ADD_SELF (val);
 })