Hello Surya, 

On 27/03/26 10:22 am, Surya Kumari Jangala wrote:
>>> diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
>>> index 04a6c0f7461..7c48cb900b6 100644
>>> --- a/gcc/config/rs6000/rs6000.md
>>> +++ b/gcc/config/rs6000/rs6000.md
>>> @@ -2676,21 +2676,18 @@
>>>     xxbrh %x0,%x1"
>>>    "reload_completed && !TARGET_POWER10 && int_reg_operand (operands[0], 
>>> HImode)"
>>>    [(set (match_dup 3)
>>> -   (and:SI (lshiftrt:SI (match_dup 4)
>>> -                        (const_int 8))
>>> -           (const_int 255)))
>>> -   (set (match_dup 2)
>>> -   (and:SI (ashift:SI (match_dup 4)
>>> -                      (const_int 8))
>>> -           (const_int 65280)))             ;; 0xff00
>>> +   (ashift:SI (match_dup 4)
>>> +              (const_int 8)))
>>>     (set (match_dup 3)
>>> -   (ior:SI (match_dup 3)
>>> -           (match_dup 2)))]
>>> +   (ior:SI (and:SI (match_dup 3)
>>> +                   (const_int -256))
> Please replace '-256' with 65280. This makes for easier reading, plus 
> logically
> a mask is just a sequence of bits usually treated as a positive number.
>
> -Surya
I think -256 or 4294967040 ((0xffffff00)) is required here to match the 
intended SImode mask
and generate the correct |rlwimi|pattern, 65280 (0x0000ff00) will not be 
equivalent.

Thank You,
Kishan

Reply via email to