]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Remove an indentation level from aarch64_if_then_else_costs
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 5 Aug 2025 20:38:21 +0000 (20:38 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 11 Aug 2025 23:25:08 +0000 (23:25 +0000)
gcc:
* config/aarch64/aarch64.cc (aarch64_if_then_else_costs): Remove
else after return and re-indent.

gcc/config/aarch64/aarch64.cc

index 2dbaf4a8e59b4e9a04e478e5f325940deea234ce..50b300416e771d7e9635703b6fc124b2e4eec62d 100644 (file)
@@ -14382,40 +14382,38 @@ aarch64_if_then_else_costs (rtx op0, rtx op1, rtx op2, int *cost, bool speed)
       /* Conditional branch.  */
       if (GET_MODE_CLASS (GET_MODE (inner)) == MODE_CC)
        return true;
-      else
+
+      if (cmpcode == NE || cmpcode == EQ)
        {
-         if (cmpcode == NE || cmpcode == EQ)
+         if (comparator == const0_rtx)
            {
-             if (comparator == const0_rtx)
-               {
-                 /* TBZ/TBNZ/CBZ/CBNZ.  */
-                 if (GET_CODE (inner) == ZERO_EXTRACT)
-                   /* TBZ/TBNZ.  */
-                   *cost += rtx_cost (XEXP (inner, 0), VOIDmode,
-                                      ZERO_EXTRACT, 0, speed);
-                 else
-                   /* CBZ/CBNZ.  */
-                   *cost += rtx_cost (inner, VOIDmode, cmpcode, 0, speed);
+             /* TBZ/TBNZ/CBZ/CBNZ.  */
+             if (GET_CODE (inner) == ZERO_EXTRACT)
+               /* TBZ/TBNZ.  */
+               *cost += rtx_cost (XEXP (inner, 0), VOIDmode,
+                                  ZERO_EXTRACT, 0, speed);
+             else
+               /* CBZ/CBNZ.  */
+               *cost += rtx_cost (inner, VOIDmode, cmpcode, 0, speed);
 
-                 return true;
-               }
-             if (register_operand (inner, VOIDmode)
-                 && aarch64_imm24 (comparator, VOIDmode))
-               {
-                 /* SUB and SUBS.  */
-                 *cost += COSTS_N_INSNS (2);
-                 if (speed)
-                   *cost += extra_cost->alu.arith * 2;
-                 return true;
-               }
+             return true;
            }
-         else if (cmpcode == LT || cmpcode == GE)
+         if (register_operand (inner, VOIDmode)
+             && aarch64_imm24 (comparator, VOIDmode))
            {
-             /* TBZ/TBNZ.  */
-             if (comparator == const0_rtx)
-               return true;
+             /* SUB and SUBS.  */
+             *cost += COSTS_N_INSNS (2);
+             if (speed)
+               *cost += extra_cost->alu.arith * 2;
+             return true;
            }
        }
+      else if (cmpcode == LT || cmpcode == GE)
+       {
+         /* TBZ/TBNZ.  */
+         if (comparator == const0_rtx)
+           return true;
+       }
     }
   else if (GET_MODE_CLASS (GET_MODE (inner)) == MODE_CC)
     {