https://llvm.org/bugs/show_bug.cgi?id=26952
Bug ID: 26952
Summary: LoopVectorizer does not properly preserve LoopInfo
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 16040
--> https://llvm.org/bugs/attachment.cgi?id=16040&action=edit
testcase
On the attached testcase based on MultiSource/Benchmarks/nbench/nbench1.c, LV
fails to preserve LoopInfo. -verify-loop-info fails with:
$ opt before-vect-func.ll -targetlibinfo -tti -tbaa -scoped-noalias
-assumption-cache-tracker -forceattrs -inferattrs -loop-vectorize
-verify-loop-info
Assertion failed: (HasInsideLoopSuccs && "Loop block has no in-loop
successors!"), function verifyLoop, file
../include/llvm/Analysis/LoopInfoImpl.h, line 279.
This is the difference between what -loops and what LV produces:
@@ -21 +20,0 @@
- Loop at depth 2 containing:
%vector.body<header>,%pred.store.if,%13,%pred.store.continue,%pred.store.if2,%15,%pred.store.continue3<latch><exiting>
@@ -31,0 +31 @@
+ Loop at depth 2 containing:
%vector.body<header><exiting>,%pred.store.continue<exiting>,%pred.store.continue3<latch><exiting>
Bunch of blocks are missing, looks like all related to store predication.
I triggered this latent bug after making LoopLoadElimination dependent on
LoopSimplify. LoopSimplify trims many blocks because of corrupt LI:
LoopSimplify: Deleting edge from dead predecessor
LoopSimplify: Deleting edge from dead predecessor
LoopSimplify: Creating dedicated exit block .loopexit
LoopSimplify: Creating dedicated exit block .loopexit4
LoopSimplify: Creating dedicated exit block for.end31.loopexit
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs