re PR rtl-optimization/57960 (S/390: LRA ICE building glibc)
authorVladimir Makarov <vmakarov@redhat.com>
Thu, 25 Jul 2013 14:58:21 +0000 (14:58 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Thu, 25 Jul 2013 14:58:21 +0000 (14:58 +0000)
2013-07-25  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/57960
* lra-constraints.c (process_alt_operands): Use the right mode
when checking strict_low.

2013-07-25  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/57960
* gcc.target/s390/pr57960.c: New.

From-SVN: r201243

gcc/ChangeLog
gcc/lra-constraints.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/pr57960.c [new file with mode: 0644]

index 0561d81f347502e3b6b9653186ab14a854d44e2f..e13f79b1237c3bb18254ec1a0d11f04716981c3f 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-25  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/57960
+       * lra-constraints.c (process_alt_operands): Use the right mode
+       when checking strict_low.
+
 2013-07-25  Jan Hubicka  <jh@suse.cz>
 
        * lto-symtab.c (lto_cgraph_replace_node): Release function body.
index 5cb06453a0367f2692fb165b9ce0ed9fb1fafcc5..29cf7dbe8527ab35faa4424b7f2728658baedec5 100644 (file)
@@ -1940,7 +1940,8 @@ process_alt_operands (int only_alternative)
                      && ira_class_hard_regs_num[this_alternative] > 0
                      && ! HARD_REGNO_MODE_OK (ira_class_hard_regs
                                               [this_alternative][0],
-                                              GET_MODE (op)))
+                                              GET_MODE
+                                              (*curr_id->operand_loc[nop])))
                    goto fail;
                  losers++;
                }
index 16e6c74a976bf3cdb373e7375b2c68ac3525cb6d..3812c7ecbd3371a3112ab7021fb52e22f6397ef1 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-25  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/57960
+       * gcc.target/s390/pr57960.c: New.
+
 2013-07-25  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/57639
diff --git a/gcc/testsuite/gcc.target/s390/pr57960.c b/gcc/testsuite/gcc.target/s390/pr57960.c
new file mode 100644 (file)
index 0000000..ee751ed
--- /dev/null
@@ -0,0 +1,30 @@
+/* PR rtl-optimization/57960  */
+
+/* { dg-do compile } */
+/* { dg-options "-march=z10 -m64 -mzarch  -O1" } */
+
+typedef union
+{
+  long double value;
+  struct
+  {
+    unsigned int w0, w1, w2, w3;
+  }
+    parts32;
+}
+  ieee854_long_double_shape_type;
+static const long double one = 1.0L;
+long double
+__ieee754_acosl (long double x)
+{
+  long double z, w;
+  int ix;
+  ieee854_long_double_shape_type u;
+
+  z = (one - u.value) * 0.5;
+  u.parts32.w2 = 0;
+  u.parts32.w3 = 0;
+  w = z - u.value * u.value;
+  return 2.0 * w;
+
+}