[llvm-bugs] [Bug 28731] New: trunk/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:229: suspicious condition ?

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 26 23:46:42 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28731

            Bug ID: 28731
           Summary: trunk/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
                    :229: suspicious condition ?
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dcb314 at hotmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

trunk/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:229]: (style) Same
expression on both sides of '||'.

Source code is

  if (Directive == PPC::DIR_PWR6 || Directive == PPC::DIR_PWR7 ||
      Directive == PPC::DIR_PWR8 || Directive == PPC::DIR_PWR8 ||
      CurSlots == 6) {

Maybe better code

  if (Directive == PPC::DIR_PWR6 || Directive == PPC::DIR_PWR7 ||
      Directive == PPC::DIR_PWR8 || Directive == PPC::DIR_PWR9 ||
      CurSlots == 6) {

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160727/fcfc932f/attachment.html>


More information about the llvm-bugs mailing list