OSDN Git Service

PR target/24954
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Nov 2005 13:00:06 +0000 (13:00 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Nov 2005 13:00:06 +0000 (13:00 +0000)
* config/rs6000/predicated.md (easy_vector_constant_add_self): Use
explicit sign extension, not a (char) cast.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107352 138bc75d-0d04-0410-961f-82ee72b054a4

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

index fa6a35c..5bc604e 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 885ac2c..b940261 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);
 })