[llvm-bugs] [Bug 43323] New: assertion lowering <128 x i1> select with avx512 enabled

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Sep 15 23:45:43 PDT 2019


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

            Bug ID: 43323
           Summary: assertion lowering <128 x i1> select with avx512
                    enabled
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: nicholas at mxc.ca
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

Testcase:

define <128 x i1> @test4(<128 x i1> %a, <128 x i1> %b, <128 x i1> %c) {
  %d = select <128 x i1> %a, <128 x i1> %b, <128 x i1> %c
  ret <128 x i1> %d
}

llc -mattr=avx512f (or -mattr=avx512vl) crashes:

llc:
/home/nicholas/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4624:
llvm::SDValue llvm::SelectionDAG::getNode(unsigned int, const llvm::SDLoc&,
llvm::EVT, llvm::SDValue, llvm::SDNodeFlags): Assertion `VT.isVector() &&
!Operand.getValueType().isVector() && (VT.getVectorElementType() ==
Operand.getValueType() || (VT.getVectorElementType().isInteger() &&
Operand.getValueType().isInteger() &&
VT.getVectorElementType().bitsLE(Operand.getValueType()))) && "Illegal
SCALAR_TO_VECTOR node!"' failed.
Stack dump:
0.      Program arguments: llvm-project/build/bin/llc -mattr=avx512vl -O2
v128bitselect.ll -o - 
1.      Running pass 'Function Pass Manager' on module 'v128bitselect.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@test4'

Produces correct code with -mattr=avx or -mattr=avx2. At worst it should call
back to avx2, not crash.

-- 
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/20190916/d5c26ec5/attachment.html>


More information about the llvm-bugs mailing list