[llvm-commits] [polly] r152913 - in /polly/trunk: lib/Support/SCEVValidator.cpp test/ScopInfo/2012-03-16-Crash-because-of-unsigned-in-scev.ll

Tobias Grosser tobias at grosser.es
Tue Sep 24 09:51:14 PDT 2013


On 09/24/2013 06:41 PM, Sebastian Pop wrote:
> Hi Tobi,
>
> it looks like this change breaks in code generation with:
> "Use still stuck around after Def is destroyed"
>
>     class ValidatorResult visitSMaxExpr(const SCEVSMaxExpr *Expr) {
> -    ValidatorResult Return(SCEVType::INT);
> +    ValidatorResult Return(SCEVType::INT, Expr);
>
>      for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) {
>        ValidatorResult Op = visit(Expr->getOperand(i));
>
>        if (!Op.isValid())
>          return Op;
>
>        Return.merge(Op);
>      }
>
>      return Return;
>    }
>
> The problem seems to be that we are adding the full original
> SMax expression to the result
> and that references SSA names of the original scop.
>
> Ok to revert this change?

This change is over a year old. It fixes an actual problem and the 
change itself does not loop obviously wrong. So reverting it is nothing 
I feel comfortable with.

If we do not update SSA names correctly, it would be interesting to 
understand why. For this an actual test case would help. For me,
the following commands do not show any issues:

$ polly-opt 
test/ScopInfo/2012-03-16-Crash-because-of-unsigned-in-scev.ll -polly-codegen
$ polly-opt 
test/ScopInfo/2012-03-16-Crash-because-of-unsigned-in-scev.ll 
-polly-codegen -polly-codegen-scev
$ polly-opt 
test/ScopInfo/2012-03-16-Crash-because-of-unsigned-in-scev.ll 
-polly-codegen-isl
$ polly-opt 
test/ScopInfo/2012-03-16-Crash-because-of-unsigned-in-scev.ll 
-polly-codegen-isl -polly-codegen-scev

Could you help me to reproduce this problem?

Tobias



More information about the llvm-commits mailing list