| Issue |
238817
|
| Summary |
LoopVectorizationLegality crash in collectCompressedPtrs with scalable types
|
| Labels |
crash-on-valid,
llvm:loopvectorize
|
| Assignees |
MacDue
|
| Reporter |
lukel97
|
Legality will try to check if this loop is legal which has a scalable vector, then crash when calling `getTypeAllocSize(AccessTy).getFixedValue()`. I doubt this ever shows up in a real pipeline so not a blocker for #214491 but would be good to fix anyway.
```llvm
; opt -passes=loop-vectorize -disable-output
; Assertion "Request for a fixed element count on a scalable object" in collectCompressedPtrs
define void @f(ptr %dst, ptr %c, i64 %n) {
entry:
br label %loop
loop:
%iv = phi i64 [ 0, %entry ], [ %iv.next, %latch ]
%p = phi ptr [ %dst, %entry ], [ %p.1, %latch ]
%gep.c = getelementptr i32, ptr %c, i64 %iv
%cv = load i32, ptr %gep.c
%cmp = icmp ne i32 %cv, 0
br i1 %cmp, label %then, label %latch
then:
store <vscale x 4 x i32> zeroinitializer, ptr %p
%p.next = getelementptr i8, ptr %p, i64 16
br label %latch
latch:
%p.1 = phi ptr [ %p.next, %then ], [ %p, %loop ]
%iv.next = add i64 %iv, 1
%ec = icmp eq i64 %iv.next, %n
br i1 %ec, label %exit, label %loop
exit:
ret void
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs