[llvm-bugs] [Bug 41488] New: llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:225: suspicious test ?

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 13 05:00:57 PDT 2019


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

            Bug ID: 41488
           Summary: llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:
                    225: suspicious test ?
           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: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:225]: (style) Same
expression on both sides of '||'.

Source code is

  if (TII->hasModifiersSet(*Sel, AMDGPU::OpName::src0_modifiers) ||
      TII->hasModifiersSet(*Sel, AMDGPU::OpName::src0_modifiers))

Maybe better code

  if (TII->hasModifiersSet(*Sel, AMDGPU::OpName::src0_modifiers) ||
      TII->hasModifiersSet(*Sel, AMDGPU::OpName::src1_modifiers))

-- 
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/20190413/e909ae1c/attachment-0001.html>


More information about the llvm-bugs mailing list