Hello!

I am trying to get movmodecc (movsicc) going for my MRISC32 machine description, but I am unable to get GCC to use my define_expand pattern.

I have tried different variants, but here is one example that I think should work:

    (define_expand "movsicc"
      [(set (match_operand:SI 0 "register_operand")
        (if_then_else:SI (match_operator 1 "comparison_operator"
                   [(match_operand:SI 2 "register_operand")
                    (match_operand:SI 3 "register_operand")])
                 (match_operand:SI 4 "register_operand")
                 (match_operand:SI 5 "register_operand")))]
      ""
    {
      if (!mrisc32_expand_conditional_move (operands))
        FAIL;
      DONE;
    })

As far as I can see, mrisc32_expand_conditional_move() is never called, even for simple code like:

    int cmov_ne(int a, int b, int c, int d) {
      return a != b ? c : d;
    }

Am I missing something? Do I need to explicitly enable conditional moves somewhere in the MD?

Regards,

  Marcus

Reply via email to