Commit c11ea44
committed
[ValueTracking] Add
Similarly to what it is being done to match simple recurrence cycle
relations, attempt to match value-accumulating recurrences of kind:
```
%umax.acc = phi i8 [ %umax, %backedge ], [ %a, %entry ]
%umax = call i8 @llvm.umax.i8(i8 %umax.acc, i8 %b)
```
Preliminary work to let InstCombine avoid folding such recurrences,
so that simple loop-invariant computation may get hoisted. Minor
opportunity to refactor out code as well.matchSimpleBinaryIntrinsicRecurrence helper1 parent ac7e391 commit c11ea44
File tree
3 files changed
+111
-30
lines changed- llvm
- include/llvm/Analysis
- lib/Analysis
- unittests/Analysis
3 files changed
+111
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
965 | 966 | | |
966 | 967 | | |
967 | 968 | | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
968 | 984 | | |
969 | 985 | | |
970 | 986 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9070 | 9070 | | |
9071 | 9071 | | |
9072 | 9072 | | |
9073 | | - | |
9074 | | - | |
| 9073 | + | |
| 9074 | + | |
| 9075 | + | |
9075 | 9076 | | |
9076 | 9077 | | |
9077 | 9078 | | |
9078 | 9079 | | |
9079 | | - | |
| 9080 | + | |
9080 | 9081 | | |
9081 | 9082 | | |
9082 | | - | |
9083 | | - | |
9084 | | - | |
9085 | | - | |
9086 | | - | |
9087 | | - | |
9088 | | - | |
9089 | | - | |
9090 | | - | |
9091 | | - | |
9092 | | - | |
9093 | | - | |
9094 | | - | |
9095 | | - | |
9096 | | - | |
9097 | | - | |
9098 | | - | |
9099 | | - | |
9100 | | - | |
9101 | | - | |
9102 | | - | |
9103 | | - | |
9104 | | - | |
9105 | | - | |
9106 | | - | |
9107 | | - | |
9108 | | - | |
| 9083 | + | |
| 9084 | + | |
| 9085 | + | |
| 9086 | + | |
| 9087 | + | |
| 9088 | + | |
| 9089 | + | |
| 9090 | + | |
| 9091 | + | |
| 9092 | + | |
| 9093 | + | |
| 9094 | + | |
9109 | 9095 | | |
9110 | 9096 | | |
9111 | 9097 | | |
9112 | 9098 | | |
| 9099 | + | |
| 9100 | + | |
| 9101 | + | |
| 9102 | + | |
| 9103 | + | |
| 9104 | + | |
| 9105 | + | |
| 9106 | + | |
| 9107 | + | |
| 9108 | + | |
| 9109 | + | |
9113 | 9110 | | |
9114 | 9111 | | |
9115 | 9112 | | |
| |||
9119 | 9116 | | |
9120 | 9117 | | |
9121 | 9118 | | |
| 9119 | + | |
| 9120 | + | |
| 9121 | + | |
| 9122 | + | |
| 9123 | + | |
| 9124 | + | |
| 9125 | + | |
| 9126 | + | |
| 9127 | + | |
| 9128 | + | |
| 9129 | + | |
| 9130 | + | |
| 9131 | + | |
| 9132 | + | |
| 9133 | + | |
| 9134 | + | |
9122 | 9135 | | |
9123 | 9136 | | |
9124 | 9137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1260 | 1312 | | |
1261 | 1313 | | |
1262 | 1314 | | |
| |||
0 commit comments