[EMAIL PROTECTED] 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