[llvm] 22a5cde - [SCEV] Separate out constant folding in mul expr creation

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 20 03:24:13 PDT 2021


Hi,

> On Oct 25, 2020, at 17:47, Nikita Popov via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> 
> Author: Nikita Popov
> Date: 2020-10-25T18:46:50+01:00
> New Revision: 22a5cde541c3306e53279fd02c6d60ae6178ef10
> 
> URL: https://github.com/llvm/llvm-project/commit/22a5cde541c3306e53279fd02c6d60ae6178ef10
> DIFF: https://github.com/llvm/llvm-project/commit/22a5cde541c3306e53279fd02c6d60ae6178ef10.diff
> 
> LOG: [SCEV] Separate out constant folding in mul expr creation
> 
> Separate out the code handling constant folding into a separate
> block, that is independent of other folds that need a constant
> first operand. Also make some minor adjustments to make the
> constant folding look nearly identical to the same code in
> getAddExpr().
> 
> The only reason this change is not strictly NFC is that the
> C1*(C2+V) fold is moved below the constant folding, which means
> that it now also applies to C1*C2*(C3+V), as it should.
> 
> Added: 


It looks like this change may cause a crash in LoopStrengthReduce: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35400 <https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35400>

To reproduce, run `llc` on  https://oss-fuzz.com/download?testcase_id=5243727227518976 <https://oss-fuzz.com/download?testcase_id=5243727227518976>

Cheers,
Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210620/3ec35e6a/attachment.html>


More information about the llvm-commits mailing list