Commit 47e7cc7
Fix logic when folding cmp in to condition modifier
We can fold condition modifier in def when def and use in cmp use same
type. When they use different types with same bit-width but different
signedness, folding requires more checks. Consider following pseudo
code:
mov A:d B:f
cmp.ge P A:ud 0x0
We cannot fold above cmp in to mov because A's dst is :d whereas the cmp
interprets it as :ud. However, we could still fold it in if cmp condition
was .z or .nz as these yield same result irrespective of signedness.
(cherry picked from commit 84aeb2a)1 parent 9fa20a2 commit 47e7cc7
1 file changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3444 | 3444 | | |
3445 | 3445 | | |
3446 | 3446 | | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
3447 | 3470 | | |
3448 | 3471 | | |
3449 | 3472 | | |
| |||
0 commit comments