[llvm-bugs] [Bug 28138] New: trunk/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp: 2 * wierd conditions ?

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 15 01:56:02 PDT 2016


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

            Bug ID: 28138
           Summary: trunk/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp: 2
                    * wierd conditions ?
           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

1.

trunk/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp:1533] ->
[trunk/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp:1533]: (style) Same
expression on both sides of '||'.

Source code is

  if (MIa->hasUnmodeledSideEffects() || MIb->hasUnmodeledSideEffects() ||
      MIa->hasOrderedMemoryRef() || MIa->hasOrderedMemoryRef())

Maybe better code

  if (MIa->hasUnmodeledSideEffects() || MIb->hasUnmodeledSideEffects() ||
      MIa->hasOrderedMemoryRef() || MIb->hasOrderedMemoryRef())

2.

trunk/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp:3678] ->
[trunk/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp:3678]: (style) Same
expression on both sides of '&&'.

Source code is

    if (isIntRegForSubInst(Src1Reg) && MI->getOperand(1).isImm() &&
        isUInt<4>(MI->getOperand(1).getImm()) && MI->getOperand(2).isImm() &&
        MI->getOperand(2).isImm() && isUInt<1>(MI->getOperand(2).getImm()))

maybe better code

    if (isIntRegForSubInst(Src1Reg) && 
        MI->getOperand(1).isImm() && isUInt<4>(MI->getOperand(1).getImm()) && 
        MI->getOperand(2).isImm() && isUInt<1>(MI->getOperand(2).getImm()))

-- 
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/20160615/938bf574/attachment.html>


More information about the llvm-bugs mailing list