[PATCH] [NoTTI] reject negative scale in addressing mode

Jingyue Wu jingyue at google.com
Wed May 6 15:45:34 PDT 2015


Seems hard in CostModel. I cannot come up with any instruction (e.g. GEP)
that triggers negative scales (unless element sizes can be negative).

This bug was triggered at
http://llvm.org/docs/doxygen/html/LoopStrengthReduce_8cpp_source.html#l01022.
isAMCompletelyFolded considered some SCEV in the form "reg - reg" free. LSR
seems the only place that computes addressing mode from SCEV where negative
scales are possible. I am trying to write an LSR test that can expose this
bug.

Jingyue

On Wed, May 6, 2015 at 11:52 AM, hfinkel at anl.gov <hfinkel at anl.gov> wrote:

> Re: Testing, it might be nice to put this into lib/Analysis/CostModel.cpp
> and then add a test in test/Analysis/CostModel/no_info.ll
>
>
> http://reviews.llvm.org/D9536
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150506/93de709b/attachment.html>


More information about the llvm-commits mailing list