Commit 491a91e
[PowerPC] Use zext instead of anyext in custom and combine (#68784)
This custom combine currently converts `and(anyext(x),c)` into
`anyext(and(x,c))`. This is not correct, because the original expression
guaranteed that the high bits are zero, while the new one sets them to
undef.
Emit `zext(and(x,c))` instead.
Fixes #68783.
(cherry picked from commit 127ed9a)1 parent 8ce6b65 commit 491a91e
File tree
2 files changed
+3
-2
lines changed- llvm
- lib/Target/PowerPC
- test/CodeGen/PowerPC
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15527 | 15527 | | |
15528 | 15528 | | |
15529 | 15529 | | |
15530 | | - | |
| 15530 | + | |
15531 | 15531 | | |
15532 | 15532 | | |
15533 | 15533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| 29 | + | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments