[SCEVValidator] Don't reorder multiplies in extractConstantFactor.
authorEli Friedman <efriedma@codeaurora.org>
Thu, 18 Aug 2016 16:30:42 +0000 (16:30 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Thu, 18 Aug 2016 16:30:42 +0000 (16:30 +0000)
commit28671c83d6dc6221a5680b180e4ac9f41f26a50b
tree53576cd21a49af5f4977fe6ad8a7ceafcd698f38
parent5195d3fc0eed633d6855a26333bc3a6a2bdcc19e
[SCEVValidator] Don't reorder multiplies in extractConstantFactor.

The existing code would add the operands in the wrong order, and eventually
crash because the SCEV expression doesn't exactly match the parameter SCEV
expression in SCEVAffinator::visit. (SCEV doesn't sort the operands to
getMulExpr in general.)

Differential Revision: https://reviews.llvm.org/D23592

llvm-svn: 279087
polly/lib/Support/SCEVValidator.cpp
polly/test/ScopInfo/scop-affine-parameter-ordering.ll [new file with mode: 0644]