OSDN Git Service

*** empty log message ***
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Oct 2002 09:59:06 +0000 (09:59 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Oct 2002 09:59:06 +0000 (09:59 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58050 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/emit-rtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/simd-5.c [new file with mode: 0644]

index b49819b..c2c29c5 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 11 10:56:17 2002  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * emit-rtl.c (gen_lowpart_common): When asked to make a vector from
+       an integer, use simplify_gen_subreg.
+
 2002-10-10  Aldy Hernandez  <aldyh@redhat.com>
 
        * extend.texi (Vector Extensions): Remove comment about single
index 889064f..2cf4107 100644 (file)
@@ -999,6 +999,10 @@ gen_lowpart_common (mode, x)
   else if (GET_CODE (x) == SUBREG || GET_CODE (x) == REG
           || GET_CODE (x) == CONCAT || GET_CODE (x) == CONST_VECTOR)
     return simplify_gen_subreg (mode, x, GET_MODE (x), offset);
+  else if ((GET_MODE_CLASS (mode) == MODE_VECTOR_INT
+           || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
+          && GET_MODE (x) == VOIDmode)
+    return simplify_gen_subreg (mode, x, int_mode_for_mode (mode), offset);
   /* If X is a CONST_INT or a CONST_DOUBLE, extract the appropriate bits
      from the low-order part of the constant.  */
   else if ((GET_MODE_CLASS (mode) == MODE_INT
index 78787bc..d54efb1 100644 (file)
@@ -1,3 +1,7 @@
+Fri Oct 11 10:56:49 2002  Richard Shann  <richard.shann@superh.com>
+
+       * gcc.c-torture/compile/simd-5.c: New test.
+
 2002-10-10  Jim Wilson  <wilson@redhat.com>
 
        * gcc.c-torture/execute/20021010-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-5.c b/gcc/testsuite/gcc.c-torture/compile/simd-5.c
new file mode 100644 (file)
index 0000000..016cccd
--- /dev/null
@@ -0,0 +1,12 @@
+#define vector64 __attribute__((vector_size(8)))
+
+main(){
+
+ vector64 int  c;
+vector64 int a = {1, -1};
+vector64 int b = {2, -2};
+c = -a + b*b*(-1LL);
+/* c is now {5, 3} */
+
+ printf("result is %llx\n", (long long)c); 
+}