Re: [PATCH] RISC-V: zero_extend(not) -> xor optimization [PR112398]

2024-11-04 Thread Jeff Law
On 11/2/24 2:58 AM, Alexey Merzlyakov wrote: This patch adds optimization of the following patterns:   (zero_extend:M (subreg:N (not:O==M (X:Q==M ->   (xor:M (zero_extend:M (subreg:N (X:M)), 0x))     ... where mask takes 0x bits of N mode bitsize For the cases when X:M does

[PATCH] RISC-V: zero_extend(not) -> xor optimization [PR112398]

2024-11-02 Thread Alexey Merzlyakov
This patch adds optimization of the following patterns:   (zero_extend:M (subreg:N (not:O==M (X:Q==M ->   (xor:M (zero_extend:M (subreg:N (X:M)), 0x))     ... where mask takes 0x bits of N mode bitsize For the cases when X:M doesn't have any non-zero bits outside of mode N, (zero_e