Commit cfd13cb
committed
[RISCV] Improve variable scoping in custom isel for ISD::AND.
Give the (and (srl/shl X, C2), C1) handling its owns private `C1` variable
it can modify using known zeros. This may be out of sync with
N1C->getZExtValue().
Add a separate const C1 for (and (sra X, C2), C1) and (and X, C).
This copy will always be in sync with N1C->getZExtValue().
Remove the IsC1Mask and IsC1ANDI variables and compute them at their
usage.
Use N1C->getSExtValue() when calling isInt. This shouldn't be a
functional change since we already checked that it was a mask. In
order for it to be a mask and a negative number, it would need to be -1
which should have been removed by DAG combine.1 parent 4745bb3 commit cfd13cb
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1217 | 1217 | | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | 1220 | | |
1224 | 1221 | | |
1225 | 1222 | | |
| |||
1253 | 1250 | | |
1254 | 1251 | | |
1255 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
1256 | 1255 | | |
1257 | 1256 | | |
1258 | 1257 | | |
| |||
1267 | 1266 | | |
1268 | 1267 | | |
1269 | 1268 | | |
1270 | | - | |
| 1269 | + | |
1271 | 1270 | | |
1272 | 1271 | | |
1273 | 1272 | | |
| |||
1450 | 1449 | | |
1451 | 1450 | | |
1452 | 1451 | | |
| 1452 | + | |
| 1453 | + | |
1453 | 1454 | | |
1454 | 1455 | | |
1455 | 1456 | | |
| |||
1480 | 1481 | | |
1481 | 1482 | | |
1482 | 1483 | | |
1483 | | - | |
| 1484 | + | |
1484 | 1485 | | |
1485 | 1486 | | |
1486 | 1487 | | |
| |||
0 commit comments