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

            Bug ID: 41454
           Summary: [X86] Support X86ISD::VPTERNLOG ternary logic on all
                    SSE/AVX targets
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

AVX512 has the VPTERNLOG instructions which can be used to describe all truth
table lookups for a 3bit index created from the same bit from 3 registers and a
i8 immediate control word.

It'd be very useful to use this to combine ternary logic patterns using this
DAG node and lower to optimized bitops patterns on all SSE/AVX targets, not
just AVX512.

This is a big generalization of the canonicalizeBitSelect function that we
already have.

Examples can be found at:
http://www.0x80.pl/articles/avx512-ternary-functions.html
https://github.com/WojciechMula/ternary-logic

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to