[llvm-bugs] [Bug 32277] New: Crash in LoopUnrollPeel
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 15 04:20:21 PDT 2017
http://bugs.llvm.org/show_bug.cgi?id=32277
Bug ID: 32277
Summary: Crash in LoopUnrollPeel
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: james.molloy at arm.com
CC: llvm-bugs at lists.llvm.org,
sanjoy at playingwithpointers.com
After the series of commits by Sanjoy on 3rd March, the following testcase
causes a crash:
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv7r-arm-none-eabi"
define hidden arm_aapcs_vfpcc i32 @test(i32 %j, i32 %k, i32 %recurs) {
entry:
%cmp = icmp eq i32 %j, 0
br label %bb2
bb2: ; preds = %entry, %bb12
%k.addr.0 = phi i32 [ %k.addr.2, %bb12 ], [ %k, %entry ]
%result.0 = phi i32 [ 20, %bb12 ], [ 0, %entry ]
br i1 %cmp, label %bb12, label %bb4
bb4: ; preds = %bb12, %bb2
%k.addr.1 = phi i32 [ %k.addr.0, %bb2 ], [ %k.addr.2, %bb12 ]
%x.1 = phi i32 [ 0, %bb2 ], [ %x.2, %bb12 ]
%result.1 = phi i32 [ %result.0, %bb2 ], [ 10, %bb12 ]
%cmp2 = icmp eq i32 %k.addr.1, 0
br i1 %cmp2, label %bb13, label %bb12
bb12: ; preds = %bb4, %bb2
%k.addr.2 = phi i32 [ %k.addr.0, %bb2 ], [ 0, %bb4 ]
%x.2 = phi i32 [ 1, %bb2 ], [ %x.1, %bb4 ]
%cmp5 = icmp eq i32 %x.2, 0
br i1 %cmp5, label %bb2, label %bb4
bb13: ; preds = %bb4
ret i32 %result.1
}
Run with "opt -O1 test.ll -disable-output":
opt: ../include/llvm/IR/Instructions.h:2715: llvm::Value
*llvm::PHINode::getIncomingValueForBlock(const llvm::BasicBlock *) const:
Assertion `Idx >= 0 && "Invalid basic block argument!"' 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/20170315/c33fdd08/attachment-0001.html>
More information about the llvm-bugs
mailing list