<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63195>63195</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
78 tests fail with all SCEV verification options enabled
</td>
</tr>
<tr>
<th>Labels</th>
<td>
SCEV
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
arsenm
</td>
</tr>
</table>
<pre>
By changing the default values to enable -verify-scev, -verify-scev-strict, -verify-scev-maps, and -scev-verify-ir, I observe 78 test failures:
```
LLVM :: Analysis/ScalarEvolution/infer-via-ranges.ll
LLVM :: Analysis/ScalarEvolution/latch-dominating-conditions.ll
LLVM :: Analysis/ScalarEvolution/pr35890.ll
LLVM :: CodeGen/AArch64/sme-intrinsics-mova-extract.ll
LLVM :: CodeGen/AArch64/sme-intrinsics-mova-insert.ll
LLVM :: CodeGen/AArch64/sve-fold-vscale.ll
LLVM :: CodeGen/AArch64/sve-int-arith.ll
LLVM :: CodeGen/AArch64/sve-lsr-scaled-index-addressing-mode.ll
LLVM :: CodeGen/AArch64/sve-ptest-removal-sink.ll
LLVM :: CodeGen/ARM/branch-on-zero.ll
LLVM :: CodeGen/Hexagon/concat-vectors-legalize.ll
LLVM :: CodeGen/PowerPC/2011-12-05-NoSpillDupCR.ll
LLVM :: CodeGen/RISCV/rvv/sink-splat-operands.ll
LLVM :: CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll
LLVM :: CodeGen/Thumb2/LowOverheadLoops/loop-guards.ll
LLVM :: CodeGen/Thumb2/LowOverheadLoops/memcall.ll
LLVM :: CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll
LLVM :: CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll
LLVM :: CodeGen/Thumb2/LowOverheadLoops/while-loops.ll
LLVM :: CodeGen/Thumb2/mve-float16regloops.ll
LLVM :: CodeGen/Thumb2/mve-float32regloops.ll
LLVM :: CodeGen/Thumb2/mve-postinc-distribute.ll
LLVM :: CodeGen/Thumb2/mve-postinc-lsr.ll
LLVM :: CodeGen/Thumb2/mve-vmaxnma-commute.ll
LLVM :: CodeGen/X86/avx512vnni-combine.ll
LLVM :: CodeGen/X86/avxvnni-combine.ll
LLVM :: CodeGen/X86/coalescer-commute4.ll
LLVM :: CodeGen/X86/masked-iv-unsafe.ll
LLVM :: CodeGen/X86/optimize-max-0.ll
LLVM :: CodeGen/X86/optimize-max-3.ll
LLVM :: CodeGen/X86/pr49451.ll
LLVM :: DebugInfo/Generic/indvar-discriminator.ll
LLVM :: Transforms/HardwareLoops/ARM/simple-do.ll
LLVM :: Transforms/HardwareLoops/ARM/structure.ll
LLVM :: Transforms/IndVarSimplify/2020-12-15-trunc-bug-expensive-range-inference.ll
LLVM :: Transforms/IndVarSimplify/AArch64/widen-loop-comp.ll
LLVM :: Transforms/IndVarSimplify/AMDGPU/no-widen-to-i64.ll
LLVM :: Transforms/IndVarSimplify/X86/eliminate-trunc.ll
LLVM :: Transforms/IndVarSimplify/X86/indvar-debug-value.ll
LLVM :: Transforms/IndVarSimplify/X86/indvar-debug-value2.ll
LLVM :: Transforms/IndVarSimplify/X86/inner-loop.ll
LLVM :: Transforms/IndVarSimplify/X86/iv-widen.ll
LLVM :: Transforms/IndVarSimplify/bec-cmp.ll
LLVM :: Transforms/IndVarSimplify/deterministic-sign.ll
LLVM :: Transforms/IndVarSimplify/elim-extend.ll
LLVM :: Transforms/IndVarSimplify/eliminate-comparison.ll
LLVM :: Transforms/IndVarSimplify/eliminate-max.ll
LLVM :: Transforms/IndVarSimplify/finite-exit-comparisons.ll
LLVM :: Transforms/IndVarSimplify/full_widening.ll
LLVM :: Transforms/IndVarSimplify/invalidate-modified-lcssa-phi.ll
LLVM :: Transforms/IndVarSimplify/iv-sext.ll
LLVM :: Transforms/IndVarSimplify/iv-widen-elim-ext.ll
LLVM :: Transforms/IndVarSimplify/lftr-reuse.ll
LLVM :: Transforms/IndVarSimplify/lftr.ll
LLVM :: Transforms/IndVarSimplify/no-iv-rewrite.ll
LLVM :: Transforms/IndVarSimplify/post-inc-range.ll
LLVM :: Transforms/IndVarSimplify/preserve-signed-wrap.ll
LLVM :: Transforms/IndVarSimplify/promote-iv-to-eliminate-casts.ll
LLVM :: Transforms/IndVarSimplify/sharpen-range.ll
LLVM :: Transforms/IndVarSimplify/signed-trip-count.ll
LLVM :: Transforms/IndVarSimplify/udiv.ll
LLVM :: Transforms/IndVarSimplify/ult-sub-to-eq.ll
LLVM :: Transforms/IndVarSimplify/use-range-metadata.ll
LLVM :: Transforms/InferAddressSpaces/AMDGPU/flat_atomic.ll
LLVM :: Transforms/LoopDeletion/invalidate-scev-after-hoisting.ll
LLVM :: Transforms/LoopFlatten/widen-iv2.ll
LLVM :: Transforms/LoopFusion/simple.ll
LLVM :: Transforms/LoopStrengthReduce/AArch64/pr47329.ll
LLVM :: Transforms/LoopStrengthReduce/RISCV/icmp-zero.ll
LLVM :: Transforms/LoopStrengthReduce/X86/2008-08-14-ShadowIV.ll
LLVM :: Transforms/LoopStrengthReduce/debuginfo-scev-salvage-0.ll
LLVM :: Transforms/LoopStrengthReduce/debuginfo-scev-salvage-5.ll
LLVM :: Transforms/LoopVectorize/X86/float-induction-x86.ll
LLVM :: Transforms/LoopVectorize/X86/unroll-pm.ll
LLVM :: Transforms/LoopVersioningLICM/loopversioningLICM2.ll
LLVM :: Transforms/PhaseOrdering/X86/excessive-unrolling.ll
LLVM :: Transforms/PhaseOrdering/X86/pixel-splat.ll
LLVM :: Transforms/PhaseOrdering/X86/vdiv.ll
```
Most look like this trip count changed sample:
```
Trip Count for Loop at depth 1 containing: %bb<header><latch><exiting>
Changed!
Old: (-1 + (1 umax %c))
New: (-1 + %c)
```
A few are different:
```
test/Analysis/ScalarEvolution/pr35890.ll
--
Exit Code: 2
Command Output (stderr):
--
SCEV for value %iv.next = add i32 %iv, %a.1 changed!
Old: {(1 + %a),+,(1 + %a)}<%loop>
New: (1 + {0,+,(1 + %a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