Commit 7f90b96
committed
cmd/compile: don't elide zero extension on top of signed values
v = ... compute some value, which zeros top 32 bits ...
w = zero-extend v
We want to remove the zero-extension operation, as it doesn't do anything.
But if v is typed as a signed value, and it gets spilled/restored, it
might be re-sign-extended upon restore. So the zero-extend isn't actually
a NOP when there might be calls or other reasons to spill in between v and w.
Fixes #68227
Change-Id: I3b30b8e56c7d70deac1fb09d2becc7395acbadf8
Reviewed-on: https://go-review.googlesource.com/c/go/+/595675
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Joedian Reid <[email protected]>
Reviewed-by: Cuong Manh Le <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>1 parent ea537cc commit 7f90b96
2 files changed
Lines changed: 57 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1287 | 1287 | | |
1288 | 1288 | | |
1289 | 1289 | | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1290 | 1295 | | |
1291 | 1296 | | |
1292 | 1297 | | |
| |||
1305 | 1310 | | |
1306 | 1311 | | |
1307 | 1312 | | |
1308 | | - | |
| 1313 | + | |
1309 | 1314 | | |
1310 | 1315 | | |
1311 | 1316 | | |
| |||
1325 | 1330 | | |
1326 | 1331 | | |
1327 | 1332 | | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
1328 | 1336 | | |
1329 | 1337 | | |
1330 | 1338 | | |
1331 | 1339 | | |
1332 | | - | |
| 1340 | + | |
1333 | 1341 | | |
1334 | 1342 | | |
1335 | 1343 | | |
| |||
1349 | 1357 | | |
1350 | 1358 | | |
1351 | 1359 | | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
1352 | 1363 | | |
1353 | 1364 | | |
1354 | 1365 | | |
1355 | 1366 | | |
1356 | | - | |
| 1367 | + | |
1357 | 1368 | | |
1358 | 1369 | | |
1359 | 1370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments