[llvm-bugs] [Bug 47949] New: CTPOP(x) > 0 isn't optimized away before SelectionDAG?

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 22 11:34:09 PDT 2020


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

            Bug ID: 47949
           Summary: CTPOP(x) > 0 isn't optimized away before SelectionDAG?
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: dave at znu.io
                CC: llvm-bugs at lists.llvm.org

I committed exhaustive x86 CTPOP tests to the repo this morning
(test/CodeGen/X86/vector-popcnt-{128,256,512}-ult-ugt.ll).

Notably, unsigned greater-than-zero tests are generating actual CTPOP emulation
when they don't need to. It should just optimize down to a comparison against
zero.

My limited investigation shows that SelectionDAG can fix this, but shouldn't an
earlier pass have caught this?

-- 
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/20201022/c0361479/attachment.html>


More information about the llvm-bugs mailing list