[llvm-bugs] [Bug 33384] New: getBasicBlockIndex() returns -1. [LoopUnroller, LoopPeel]
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 9 07:20:19 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33384
Bug ID: 33384
Summary: getBasicBlockIndex() returns -1. [LoopUnroller,
LoopPeel]
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: paulsson at linux.vnet.ibm.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18603
--> https://bugs.llvm.org/attachment.cgi?id=18603&action=edit
reduced testcase
bin/opt -S -mtriple=s390x-unknown-linux -mcpu=z13 -O3 -o out.opt.ll
unroller_assert.ll
include/llvm/IR/Instructions.h:2764: llvm::Value*
llvm::PHINode::getIncomingValueForBlock(const llvm::BasicBlock*) const:
Assertion `Idx >= 0 && "Invalid basic block argument!"' failed.
Value *getIncomingValueForBlock(const BasicBlock *BB) const {
int Idx = getBasicBlockIndex(BB);
assert(Idx >= 0 && "Invalid basic block argument!");
return getIncomingValue(Idx);
}
p Idx
$184 = -1
[UP]
LoopUnroll.cpp:
PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader));
p Preheader->dump()
entry:
%l_869 = alloca [8 x i32], align 4
br label %for.cond1128.preheader.peel.begin
p L->getLoopPreheader()->dump()
entry.peel.newph: ; preds =
%for.cond1128.preheader.peel.next9
br label %for.cond1128.preheader
Why is Preheader != L->getLoopPreheader() ?
Why is the index for the entry block -1?
Related to peeling?
--
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/20170609/7bec003f/attachment.html>
More information about the llvm-bugs
mailing list