[llvm-bugs] [Bug 50374] New: static llvm::FixedVectorType *llvm::FixedVectorType::get(llvm::Type *, unsigned int): Assertion `NumElts > 0 && "#Elements of a VectorType must be greater than 0"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 17 08:39:17 PDT 2021


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

            Bug ID: 50374
           Summary: static llvm::FixedVectorType
                    *llvm::FixedVectorType::get(llvm::Type *, unsigned
                    int): Assertion `NumElts > 0 && "#Elements of a
                    VectorType must be greater than 0"' failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: benny.kra at gmail.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

$ cat reduce.ll
define fastcc void
@wide.body_computation__18.1604.clone.clone.clone.clone.clone.clone()
unnamed_addr {
while.84.body.preheader:
  %0 = load i8, i8* undef, align 1
  %1 = load i8, i8* undef, align 4
  %.not14.2.2 = icmp eq i8 0, 0
  %2 = and i8 %0, 1
  %.not14.1.2 = icmp eq i8 %2, 0
  %3 = select i1 %.not14.2.2, i1 %.not14.1.2, i1 false
  %.not14.2361 = icmp eq i8 0, 0
  %4 = select i1 %3, i1 %.not14.2361, i1 false
  %add.10961.i.2.2 = select reassoc nsz contract i1 %4, float 0.000000e+00,
float 0x7FF8000000000000
  %broadcast.splatinsert2024 = insertelement <8 x float> poison, float
%add.10961.i.2.2, i32 0
  %broadcast.splat2025 = shufflevector <8 x float> %broadcast.splatinsert2024,
<8 x float> poison, <8 x i32> zeroinitializer
  %broadcast.splatinsert2049 = insertelement <8 x i8> poison, i8 %1, i32 0
  %broadcast.splat2050 = shufflevector <8 x i8> %broadcast.splatinsert2049, <8
x i8> poison, <8 x i32> zeroinitializer
  br label %vector.body1999

vector.body1999:                                  ; preds = %vector.body1999,
%while.84.body.preheader
  %predphi2026 = select <8 x i1> undef, <8 x float> undef, <8 x float>
%broadcast.splat2025
  %predphi2051 = select <8 x i1> undef, <8 x i8> %broadcast.splat2050, <8 x i8>
undef
  br label %vector.body1999
}

$ llc < reduced.ll -mcpu=skx
llc: llvm/lib/IR/Type.cpp:645: static llvm::FixedVectorType
*llvm::FixedVectorType::get(llvm::Type *, unsigned int): Assertion `NumElts > 0
&& "#Elements of a VectorType must be greater than 0"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: llc -mcpu=skx
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@wide.body_computation__18.1604.clone.clone.clone.clone.clone.clone'

The crashing code path was added in
https://github.com/llvm/llvm-project/commit/aa4afebbf90f1c0ec7853b95c108f9c363e226eb

-- 
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/20210517/9053a09d/attachment.html>


More information about the llvm-bugs mailing list