[LLVMdev] [Polly] Assert in Scope construction
Sergei Larin
slarin at codeaurora.org
Wed Jul 3 10:36:11 PDT 2013
Should have changed the subject line...
---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Sergei Larin
> Sent: Wednesday, July 03, 2013 12:29 PM
> To: 'Tobias Grosser'
> Cc: 'llvmdev'
> Subject: Re: [LLVMdev] [LNT] Question about results reliability in LNT
> infrustructure
>
>
> Tobias,
>
> I seem to trigger an assert in Polly lib/Analysis/TempScopInfo.cpp
>
> void TempScopInfo::buildAffineCondition(Value &V, bool inverted,
> Comparison **Comp) const { ...
> ICmpInst *ICmp = dyn_cast<ICmpInst>(&V);
> assert(ICmp && "Only ICmpInst of constant as condition supported!"); ...
>
> The code it chokes on looks like this (see below). The problem is this
OR-ed
> compare result:
>
> %cmp3 = icmp sgt i32 %j.0, 2
> %cmp5 = icmp eq i32 %j.0, 1
> %or.cond13 = or i1 %cmp3, %cmp5
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ==
> Value V
>
>
> My question - is this a bug or a (missing) feature? ...and how it should
be
> handled in theory?
>
> Thanks.
>
> Sergei
>
> define i32 @main() #0 {
> entry:
> %j.0.lcssa.reg2mem = alloca i32, align 8
> br label %entry.split
>
> entry.split: ; preds = %entry
> %call = tail call i32 @foo(i32 0, i32 0) #2
> %call1 = tail call i32 @foo(i32 %call, i32 %call) #2
> br label %for.cond2
>
> for.cond2: ; preds = %for.inc,
> %entry.split
> %j.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.inc ]
> %cmp3 = icmp sgt i32 %j.0, 2
> %cmp5 = icmp eq i32 %j.0, 1
> %or.cond13 = or i1 %cmp3, %cmp5
> store i32 %j.0, i32* %j.0.lcssa.reg2mem, align 8
> br i1 %or.cond13, label %for.end8, label %for.inc,
> !llvm.listen.preserve.while.opt !0
>
> for.inc: ; preds = %for.cond2
> %inc = add nsw i32 %j.0, 1
> br label %for.cond2
>
> for.end8: ; preds = %for.cond2
> %j.0.lcssa.reload = load i32* %j.0.lcssa.reg2mem, align 8
> %cmp10 = icmp eq i32 %j.0.lcssa.reload, 1
> %add = add nsw i32 %j.0.lcssa.reload, 1
> %retval.0 = select i1 %cmp10, i32 1, i32 %add
> ret i32 %retval.0
> }
>
>
> ---
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> hosted by The Linux Foundation
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list