Allow negative offset for UNSPEC_DTPOFF/UNSPEC_NTPOFF
[gcc.git] / gcc / dojump.c
index 67452005e90837d4850259c3ff58bc130d4903c5..66d3b04bd035e20e0668ef9a4a7b2b4085688972 100644 (file)
@@ -35,7 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "ggc.h"
 #include "basic-block.h"
-#include "output.h"
 #include "tm_p.h"
 
 static bool prefer_and_bit_test (enum machine_mode, int);
@@ -166,8 +165,7 @@ prefer_and_bit_test (enum machine_mode mode, int bitnum)
 
   /* Fill in the integers.  */
   XEXP (and_test, 1)
-    = immed_double_int_const (double_int_setbit (double_int_zero, bitnum),
-                                                mode);
+    = immed_double_int_const (double_int_zero.set_bit (bitnum), mode);
   XEXP (XEXP (shift_test, 0), 1) = GEN_INT (bitnum);
 
   speed_p = optimize_insn_for_speed_p ();
@@ -1029,19 +1027,16 @@ do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp,
          op0 = op1;
          op1 = tmp;
        }
-
       else if (SCALAR_FLOAT_MODE_P (mode)
               && ! can_compare_p (code, mode, ccp_jump)
-
-              /* Never split ORDERED and UNORDERED.  These must be implemented.  */
+              /* Never split ORDERED and UNORDERED.
+                 These must be implemented.  */
               && (code != ORDERED && code != UNORDERED)
-
-               /* Split a floating-point comparison if we can jump on other
-                 conditions...  */
+               /* Split a floating-point comparison if
+                 we can jump on other conditions...  */
               && (have_insn_for (COMPARE, mode)
-
                   /* ... or if there is no libcall for it.  */
-                  || code_to_optab[code] == NULL))
+                  || code_to_optab (code) == unknown_optab))
         {
          enum rtx_code first_code;
          bool and_them = split_comparison (code, mode, &first_code, &code);
@@ -1084,15 +1079,10 @@ do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp,
               last = NEXT_INSN (last))
            if (JUMP_P (last))
              break;
-         if (!last
-             || !JUMP_P (last)
-             || NEXT_INSN (last)
-             || !any_condjump_p (last))
-           {
-             if (dump_file)
-               fprintf (dump_file, "Failed to add probability note\n");
-           }
-         else
+         if (last
+             && JUMP_P (last)
+             && ! NEXT_INSN (last)
+             && any_condjump_p (last))
            {
              gcc_assert (!find_reg_note (last, REG_BR_PROB, 0));
              add_reg_note (last, REG_BR_PROB, GEN_INT (prob));