This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Commit 3512bcc
committed
[SCEV] Fix incorrect extension in computeConstantDifference()
The Mul factor was zero-extended here, resulting in incorrect
results for integers larger than 64-bit.
As we currently only multiply by 1 or -1, just split this into
two cases -- there's no need for a full multiplication here.
Fixes llvm#102597.1 parent 513c372 commit 3512bcc
File tree
2 files changed
+11
-5
lines changed- llvm
- lib/Analysis
- test/Transforms/IndVarSimplify
2 files changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11961 | 11961 | | |
11962 | 11962 | | |
11963 | 11963 | | |
11964 | | - | |
11965 | | - | |
11966 | | - | |
| 11964 | + | |
| 11965 | + | |
| 11966 | + | |
| 11967 | + | |
| 11968 | + | |
| 11969 | + | |
| 11970 | + | |
| 11971 | + | |
11967 | 11972 | | |
11968 | 11973 | | |
11969 | 11974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments