* rtlanal.c (volatile_insn_p): Delete commented out code.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Dec 2012 21:38:11 +0000 (21:38 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Dec 2012 21:38:11 +0000 (21:38 +0000)
(side_effects_p): Likewise.
(may_trap_p_1) <UNSPEC_VOLATILE>: Return 1 again.
* target.def (unspec_may_trap_p): Adjust comment.
* targhooks.c (default_unspec_may_trap_p): Don't handle UNSPEC_VOLATILE.
* config/ia64/ia64.c (ia64_unspec_may_trap_p): Adjust to above change.

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

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/rtlanal.c
gcc/target.def
gcc/targhooks.c

index 8f0bc88..21af147 100644 (file)
@@ -1,3 +1,12 @@
+2012-12-21  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * rtlanal.c (volatile_insn_p): Delete commented out code.
+       (side_effects_p): Likewise.
+       (may_trap_p_1) <UNSPEC_VOLATILE>: Return 1 again.
+       * target.def (unspec_may_trap_p): Adjust comment.
+       * targhooks.c (default_unspec_may_trap_p): Don't handle UNSPEC_VOLATILE.
+       * config/ia64/ia64.c (ia64_unspec_may_trap_p): Adjust to above change.
+
 2012-12-21  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR middle-end/55775
index 3b19b98..9be9b42 100644 (file)
@@ -5845,19 +5845,16 @@ ia64_secondary_reload_class (enum reg_class rclass,
 static int
 ia64_unspec_may_trap_p (const_rtx x, unsigned flags)
 {
-  if (GET_CODE (x) == UNSPEC)
+  switch (XINT (x, 1))
     {
-      switch (XINT (x, 1))
-       {
-       case UNSPEC_LDA:
-       case UNSPEC_LDS:
-       case UNSPEC_LDSA:
-       case UNSPEC_LDCCLR:
-       case UNSPEC_CHKACLR:
-       case UNSPEC_CHKS:
-         /* These unspecs are just wrappers.  */
-         return may_trap_p_1 (XVECEXP (x, 0, 0), flags);
-       }
+    case UNSPEC_LDA:
+    case UNSPEC_LDS:
+    case UNSPEC_LDSA:
+    case UNSPEC_LDCCLR:
+    case UNSPEC_CHKACLR:
+    case UNSPEC_CHKS:
+      /* These unspecs are just wrappers.  */
+      return may_trap_p_1 (XVECEXP (x, 0, 0), flags);
     }
 
   return default_unspec_may_trap_p (x, flags);
index 3826481..b14a2a8 100644 (file)
@@ -2107,7 +2107,6 @@ volatile_insn_p (const_rtx x)
       return 0;
 
     case UNSPEC_VOLATILE:
- /* case TRAP_IF: This isn't clear yet.  */
       return 1;
 
     case ASM_INPUT:
@@ -2240,7 +2239,6 @@ side_effects_p (const_rtx x)
     case POST_MODIFY:
     case CALL:
     case UNSPEC_VOLATILE:
- /* case TRAP_IF: This isn't clear yet.  */
       return 1;
 
     case MEM:
@@ -2312,9 +2310,9 @@ may_trap_p_1 (const_rtx x, unsigned flags)
       return 0;
 
     case UNSPEC:
-    case UNSPEC_VOLATILE:
       return targetm.unspec_may_trap_p (x, flags);
 
+    case UNSPEC_VOLATILE:
     case ASM_INPUT:
     case TRAP_IF:
       return 1;
@@ -2406,8 +2404,7 @@ may_trap_p_1 (const_rtx x, unsigned flags)
 
     default:
       /* Any floating arithmetic may trap.  */
-      if (SCALAR_FLOAT_MODE_P (GET_MODE (x))
-         && flag_trapping_math)
+      if (SCALAR_FLOAT_MODE_P (GET_MODE (x)) && flag_trapping_math)
        return 1;
     }
 
index bbda6c2..c5bbfae 100644 (file)
@@ -1816,7 +1816,7 @@ DEFHOOK
  "",
  rtx, (rtx hard_reg), NULL)
 
-/* Return nonzero if evaluating UNSPEC[_VOLATILE] X might cause a trap.
+/* Return nonzero if evaluating UNSPEC X might cause a trap.
    FLAGS has the same meaning as in rtlanal.c: may_trap_p_1.  */
 DEFHOOK
 (unspec_may_trap_p,
index 241c1cc..954cdb9 100644 (file)
@@ -102,10 +102,8 @@ default_unspec_may_trap_p (const_rtx x, unsigned flags)
 {
   int i;
 
-  if (GET_CODE (x) == UNSPEC_VOLATILE
-      /* Any floating arithmetic may trap.  */
-      || (SCALAR_FLOAT_MODE_P (GET_MODE (x))
-         && flag_trapping_math))
+  /* Any floating arithmetic may trap.  */
+  if ((SCALAR_FLOAT_MODE_P (GET_MODE (x)) && flag_trapping_math))
     return 1;
 
   for (i = 0; i < XVECLEN (x, 0); ++i)