[SCEVAffinator] Fix assertion checking for constant divisor.
authorMichael Kruse <llvm@meinersbur.de>
Tue, 12 Jul 2016 15:08:47 +0000 (15:08 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 12 Jul 2016 15:08:47 +0000 (15:08 +0000)
commite448364320d143abd8ec87387565489862dc3049
tree93da7f12e8d8c010066ba500907f72b70eff1555
parent8a93f822e1763b58a452107c58f925a1a61eb6ff
[SCEVAffinator] Fix assertion checking for constant divisor.

An assertion in visitSDivInstruction() checked whether the divisor is constant
by checking whether the argument is a ConstantInt. However, SCEVValidator allows
the divisor to be simplified to a constant by ScalarEvolution.

We synchronize the implementation of SCEVValidator and SCEVAffinator to both
accept simplified SCEV expressions.

llvm-svn: 275174
polly/lib/Support/SCEVAffinator.cpp
polly/test/ScopInfo/scev-div-with-evaluatable-divisor.ll [new file with mode: 0644]