On Tue, Jun 11, 2024 at 10:40:01PM +0800, liuhongt wrote:
> gcc/ChangeLog:
>
> PR target/115384
> * simplify-rtx.cc (simplify_context::simplify_binary_operation_1):
> Only do the simplification of (AND (ASHIFTRT A imm) mask)
> to (LSHIFTRT A imm) when the component of const
>
> I think if you only handle CONST_INT_P, you should check just for that, and
> in both places where you check for CONST_VECTOR_DUPLICATE_P (there is one
> spot 2 lines above this).
> So add
> && CONST_INT_P (XVECEXP (XEXP (op0, 1), 0, 0))
> and
> && CONST_INT_P (XVECEXP (op1, 0, 0))
> tests righ