[llvm-bugs] [Bug 48564] New: LoopVectorization crash

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 21 02:48:13 PST 2020


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

            Bug ID: 48564
           Summary: LoopVectorization crash
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: serguei.katkov at azul.com
                CC: llvm-bugs at lists.llvm.org

Loop Vectorizer crashes with assert for the following simple test:
========================================================
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"

define void @test() #0 {
bb:
  br label %bb2

bb1:                                              ; preds = %bb2
  %tmp = phi i32 [ %tmp6, %bb2 ]
  unreachable

bb2:                                              ; preds = %bb2, %bb
  %tmp3 = phi i32 [ %tmp8, %bb2 ], [ undef, %bb ]
  %tmp4 = phi i32 [ %tmp7, %bb2 ], [ undef, %bb ]
  %tmp5 = phi i32 [ %tmp6, %bb2 ], [ undef, %bb ]
  %tmp6 = add i32 %tmp5, %tmp4
  %tmp7 = udiv i32 219220132, %tmp3
  %tmp8 = add nsw i32 %tmp3, -1
  %tmp9 = icmp slt i32 %tmp3, 2
  br i1 %tmp9, label %bb1, label %bb2, !prof !2
}

attributes #0 = {
"target-features"="+sse2,-tsxldtrk,+cx16,+sahf,-tbm,-avx512ifma,-sha,-gfni,-fma4,-vpclmulqdq,+prfchw,+bmi2,-cldemote,+fsgsbase,-ptwrite,-amx-tile,-uintr,+popcnt,-widekl,+aes,-avx512bitalg,-movdiri,-xsaves,-avx512er,-avxvnni,-avx512vnni,-amx-bf16,-avx512vpopcntdq,-pconfig,-clwb,-avx512f,-xsavec,-clzero,-pku,+mmx,-lwp,-rdpid,-xop,+rdseed,-waitpkg,-kl,-movdir64b,-sse4a,-avx512bw,-clflushopt,+xsave,-avx512vbmi2,+64bit,-avx512vl,-serialize,-hreset,+invpcid,-avx512cd,+avx,-vaes,-avx512bf16,+cx8,+fma,+rtm,+bmi,-enqcmd,+rdrnd,-mwaitx,+sse4.1,+sse4.2,+avx2,+fxsr,-wbnoinvd,+sse,+lzcnt,+pclmul,-prefetchwt1,+f16c,+ssse3,-sgx,-shstk,+cmov,-avx512vbmi,-amx-int8,+movbe,-avx512vp2intersect,+xsaveopt,-avx512dq,+adx,-avx512pf"
}

!2 = !{!"branch_weights", i32 1, i32 1}
========================================================
$ opt -S -o /dev/null -passes=loop-vectorize ./test.ll
opt:
/localhome/skatkov/work/llvm/src/llvm/lib/Transforms/Vectorize/VPlan.h:193:
void llvm::VectorizerValueMap::setVectorValue(llvm::Value*, unsigned int,
llvm::Value*): Assertion `!hasVectorValue(Key, Part) && "Vector value already
set for part"' failed.

-- 
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/20201221/a88edfb8/attachment.html>


More information about the llvm-bugs mailing list