[llvm-dev] RFC for a design change in LoopStrengthReduce / ScalarEvolution

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 17 14:38:15 PDT 2015


> To back up for a second, how much of this is self-inflicted damage?
> IndVarSimplify likes to preemptively widen induction variables. Is
> that why you have the extensions here in the first place?

In the specific example I was talking about the zext came from our
frontend (our FE used to insert these extensions for reasons that are
no longer relevant).  But you can easily get the same behavior from an
expression like `a[(unsigned long)i]`.

This looked like a fairly straightforward LSR problem to me,
especially because SCEV already has all the smarts to infer the
required properties.  The only thing missing the right framing of the
problem (i.e. framing it in a way such that we can implement a
maintainable solution).

-- Sanjoy


More information about the llvm-dev mailing list