does the instruction combiner regards (foo & 0xff) as a special case?
Ian Lance Taylor
ian@airs.com
Mon Aug 1 02:57:00 GMT 2005
ibanez@sunplus.com writes:
> Does the instruction combiner regards (foo & 0xff) as a special case?
>
> I have two patterns which I expect to match all the
>
> if(foo & $(constant)) patterns. They are
>
> [(set (reg:CC_Z CC_REGNUM)
> (compare:CC_Z
> (and:SI (match_operand:SI 0 "register_operand" "")
> (match_operand:SI 1 "" ""))
> (const_int 0)))]
>
> [(set (reg:CC_Z CC_REGNUM)
> (compare:CC_Z (zero_extract:SI
> (match_operand:SI 0 "register_operand" "")
> (const_int 1)
> (match_operand:SI 1 "" ""))
> (const_int 0)))]
>
> But I found they fails to match
>
> if(foo & 0xff) and if(foo & 0xffff)
Look at the debugging dump before the combine pass to see what you
need to match.
Ian
More information about the Gcc
mailing list