]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/57379 (Segfault in invalidate_any_buried_refs (x=0x0) at ...
authorUros Bizjak <ubizjak@gmail.com>
Mon, 10 Jun 2013 18:45:02 +0000 (20:45 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 10 Jun 2013 18:45:02 +0000 (20:45 +0200)
Backport from mainline
2013-06-10  Uros Bizjak  <ubizjak@gmail.com>

* config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
cmp_code to construct REG_EQUAL note.

Backport from mainline
2013-06-05  Uros Bizjak  <ubizjak@gmail.com>

* config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
GE, GT, GEU and GTU compares, modulo DImode compares with zero.

Backport from mainline
2013-05-23  Uros Bizjak  <ubizjak@gmail.com>

PR target/57379
* config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
* config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.

From-SVN: r199902

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.md

index f74e049046af84f9b19eb23ede1e42c3164c212f..82071ffc21207d52d556a788d5aaa022413a58ca 100644 (file)
@@ -1,3 +1,25 @@
+2013-06-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
+       cmp_code to construct REG_EQUAL note.
+
+       Backport from mainline
+       2013-06-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
+       GE, GT, GEU and GTU compares, modulo DImode compares with zero.
+
+       Backport from mainline
+       2013-05-23  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/57379
+       * config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
+       * config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
+       REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.
+
 2013-06-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/57568
index f27c08a8cf89e9611e8826749ce9ef46dd1ac26e..388e77d977e64fd1f2d515f46a2887fb33d1ee2a 100644 (file)
@@ -2658,12 +2658,12 @@ alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
       break;
 
     case GE:  case GT:  case GEU:  case GTU:
-      /* These must be swapped.  */
-      if (op1 != CONST0_RTX (cmp_mode))
-       {
-         code = swap_condition (code);
-         tem = op0, op0 = op1, op1 = tem;
-       }
+      /* These normally need swapping, but for integer zero we have
+        special patterns that recognize swapped operands.  */
+      if (cmp_mode == DImode && op1 == const0_rtx)
+       break;
+      code = swap_condition (code);
+      tem = op0, op0 = op1, op1 = tem;
       break;
 
     default:
@@ -3025,12 +3025,9 @@ alpha_emit_xfloating_compare (enum rtx_code *pcode, rtx op0, rtx op1)
   operands[1] = op1;
   out = gen_reg_rtx (DImode);
 
-  /* What's actually returned is -1,0,1, not a proper boolean value,
-     so use an EXPR_LIST as with a generic libcall instead of a 
-     comparison type expression.  */
-  note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX);
-  note = gen_rtx_EXPR_LIST (VOIDmode, op0, note);
-  note = gen_rtx_EXPR_LIST (VOIDmode, func, note);
+  /* What's actually returned is -1,0,1, not a proper boolean value.  */
+  note = gen_rtx_fmt_ee (cmp_code, VOIDmode, op0, op1);
+  note = gen_rtx_UNSPEC (DImode, gen_rtvec (1, note), UNSPEC_XFLT_COMPARE);
   alpha_emit_xfloating_libcall (func, out, operands, 2, note);
 
   return out;
index e715cc86422c8c29f2d11ae29735b980857f1896..bab04e4e566cbf33df24df87258f9067fe66ee87 100644 (file)
@@ -25,6 +25,7 @@
 ;; Uses of UNSPEC in this file:
 
 (define_c_enum "unspec" [
+  UNSPEC_XFLT_COMPARE
   UNSPEC_ARG_HOME
   UNSPEC_LDGP1
   UNSPEC_INSXH