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)

Did I forget something ?

Thank you for your reading.

Reply via email to