Re: [PATCH] simplify-rtx: Combine bitwise operations in more cases

2025-04-28 Thread Pengfei Li
Thanks Richard for all review comments. I have addressed the comments and sent a v2 patch in a new email thread. -- Thanks, Pengfei

Re: [PATCH] simplify-rtx: Combine bitwise operations in more cases

2025-04-25 Thread Jeff Law
On 4/25/25 9:29 AM, Richard Sandiford wrote: @@ -4274,6 +4286,18 @@ simplify_context::simplify_binary_operation_1 (rtx_code code, return simplify_gen_binary (LSHIFTRT, mode, XEXP (op0, 0), XEXP (op0, 1)); } + /* Convert (and (subreg (not X) off) Y) into (and (not

Re: [PATCH] simplify-rtx: Combine bitwise operations in more cases

2025-04-25 Thread Richard Sandiford
Pengfei Li writes: > This patch transforms RTL expressions of the form (subreg (not X) off) > into (not (subreg X off)) when the subreg is an operand of a bitwise AND > or OR. This transformation can expose opportunities to combine a NOT > operation with the bitwise AND/OR. > > For example, it imp