[llvm-bugs] [Bug 26952] New: LoopVectorizer does not properly preserve LoopInfo
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 15 09:50:08 PDT 2016
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: unassignedbugs at nondot.org
Reporter: anemet at apple.com
CC: llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160315/65e24cf5/attachment.html>
More information about the llvm-bugs
mailing list