Skip to content
Commit 4d543d65 authored by Tobias Grosser's avatar Tobias Grosser
Browse files

SCEVValidator: add new parameters resulting from constant extraction

When extracting constant expressions out of SCEVs, new parameters may be
introduced, which have not been registered before. This change scans
SCEV expressions after constant extraction again to make sure newly
introduced parameters are registered.

We may for example extract the constant '8' from the expression '((8 * ((%a *
%b) + %c)) + (-8 * %a))' and obtain the expression '(((-1 + %b) * %a) + %c)'.
The new expression has a new parameter '(-1 + %b) * %a)', which was not
registered before, but must be registered to not crash.

This closes http://llvm.org/PR30953



Reported-by: default avatarEli Friedman <efriedma@codeaurora.org>
llvm-svn: 286430
parent 0ae390ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment