[NFC][IndVarSimplify] Test: replacing IV user with unsafe loop-invariant (PR45360)
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 18 Jun 2020 16:29:23 +0000 (19:29 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 18 Jun 2020 16:35:35 +0000 (19:35 +0300)
commitda419320ef22c68b8178e1e349398877448b163f
tree990f73dbb217192141e470ad1324021ac05de688
parent4971d0b8ec6e8d3b9ea5980d96cf5812886671df
[NFC][IndVarSimplify] Test: replacing IV user with unsafe loop-invariant (PR45360)

https://bugs.llvm.org/show_bug.cgi?id=45360

This is reduced from the (runnable) test provided in the bug report.
The remainder operation is originally guarded, it never divides by zero.
Indvars should not make it execute unconditionally.

This is not a great test, running whole -O2 is fragile,
but i really don't understand why running -indvars on the IR before
that tranform happens doesn't work.
llvm/test/Transforms/IndVarSimplify/X86/pr45360.ll [new file with mode: 0644]