https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118333

            Bug ID: 118333
           Summary: gcc/config/i386/i386-expand.cc:24871: Pointless
                    condition ?
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Static analyser cppcheck says:

gcc/config/i386/i386-expand.cc:24871:35: warning: Identical condition
'!TARGET_AVX512BW', second condition is always false
[identicalConditionAfterEarlyExit]

Source code is

  if (!TARGET_AVX512BW)
    return false;

  if ((qimode == V16QImode && !TARGET_AVX2)
      || (qimode == V32QImode && (!TARGET_AVX512BW || !TARGET_EVEX512))
      /* There are no V64HImode instructions.  */
      || qimode == V64QImode)
     return false;

Suggest remove second condition.

Reply via email to