[v4,3/4] i386: Avoid always-true condition

Message ID 20260707214457.1628003-4-hjl.tools@gmail.com
State Committed
Commit 7a5bee01193e5b06ea9c4154ec168351c7b93bb1
Headers
Series x86: Implement TARGET_FNTYPE_ABI |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap fail Patch failed to apply

Commit Message

H.J. Lu July 7, 2026, 9:44 p.m. UTC
  From: Richard Sandiford <rdsandiford@googlemail.com>

ix86_function_arg is always passed a cumulative argument structure,
so the ?: test in the patch was redundant.

gcc/
	* config/i386/i386.cc (ix86_function_arg): Remove always-true
	condition.
---
 gcc/config/i386/i386.cc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Patch

diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index acb8d2db99f..197c71c2f01 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -3601,9 +3601,7 @@  ix86_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
 
   if (TARGET_64BIT)
     {
-      enum calling_abi call_abi = cum ? cum->call_abi : ix86_abi;
-
-      if (call_abi == MS_ABI)
+      if (cum->call_abi == MS_ABI)
 	reg = function_arg_ms_64 (cum, mode, arg.mode, arg.named,
 				  arg.type, bytes);
       else