Commit 6674962
committed
[SCEV] Preserve divisibility info when creating UMax/SMax expressions.
Currently we generate (S|U)Max(1, Op) for Op >= 1. This may discard
divisibility info of Op. This patch rewrites such SMax/UMax expressions
to use the lowest common multiplier for all non-constant operands.1 parent e8e678c commit 6674962
File tree
2 files changed
+24
-4
lines changed- llvm
- lib/Analysis
- test/Analysis/ScalarEvolution
2 files changed
+24
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15850 | 15850 | | |
15851 | 15851 | | |
15852 | 15852 | | |
| 15853 | + | |
| 15854 | + | |
15853 | 15855 | | |
15854 | 15856 | | |
15855 | 15857 | | |
15856 | 15858 | | |
15857 | | - | |
| 15859 | + | |
15858 | 15860 | | |
| 15861 | + | |
| 15862 | + | |
| 15863 | + | |
15859 | 15864 | | |
15860 | 15865 | | |
15861 | 15866 | | |
| |||
15986 | 15991 | | |
15987 | 15992 | | |
15988 | 15993 | | |
15989 | | - | |
| 15994 | + | |
| 15995 | + | |
| 15996 | + | |
| 15997 | + | |
| 15998 | + | |
| 15999 | + | |
| 16000 | + | |
| 16001 | + | |
| 16002 | + | |
| 16003 | + | |
| 16004 | + | |
| 16005 | + | |
| 16006 | + | |
| 16007 | + | |
| 16008 | + | |
| 16009 | + | |
15990 | 16010 | | |
15991 | 16011 | | |
15992 | 16012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
0 commit comments