[llvm-dev] Loop optimised into div (?)

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 23 12:24:02 PDT 2019


Hi Joan,

On Wed, 23 Oct 2019 at 12:08, Joan Lluch via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> The above was compiled for the MSP430 target with the -Os flag but similar results are obtained with the other options except -O0
>
> Any pointers about where does that transform happen would be appreciated (I posted a similar question in cfe-dev).

Running Clang with "-mllvm -print-after-all" is useful to answer this
question (though beware, some passes don't show up there for various
reasons). In this case it seems to be "Induction Variable
Simplification", which lives in
lib/Transforms/Scalar/IndVarSimplify.cpp.

Cheers.

Tim.


More information about the llvm-dev mailing list