This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Conditional negation elimination in tree-ssa-phiopt.c


On Tue, Aug 12, 2014 at 04:16:34PM +0100, Kyrill Tkachov wrote:
> >I managed to get combine to recognise this pattern:
> >(set (match_operand:GPI 0 "register_operand" "=r")
> >          (plus:GPI (xor:GPI (neg:GPI (match_operand:GPI 1
> >"register_operand" "r"))
> >                             (match_operand:GPI 2 "register_operand" "r"))
> >                    (match_dup 1)))
> >
> >Now what I need is for operand 1 to instead be a cc_reg comparison,

You can add
  "nonzero_bits (operands[1], <MODE>mode) == 1"
to this pattern's condition.


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]