https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127538

--- Comment #7 from Drea Pinski <pinskia at gcc dot gnu.org> ---
That is :
```
Trying 33, 34 -> 35:
   33: cc:CC=cmp(r102:DI,r103:DI)
   34: r105:DI={(geu(cc:CC,0))?r103:DI:0}
      REG_DEAD r103:DI
      REG_DEAD cc:CC
   35: r102:DI=r102:DI-r105:DI
      REG_DEAD r105:DI
Failed to match this instruction:
(set (reg/v:DI 102 [ xD.4508 ])
    (minus:DI (reg/v:DI 102 [ xD.4508 ])
        (if_then_else:DI (geu (reg/v:DI 102 [ xD.4508 ])
                (reg/v:DI 103 [ qD.4509 ]))
            (reg/v:DI 103 [ qD.4509 ])
            (const_int 0 [0]))))
```
Being matched.

What was happening in before was a few peepholes in aarch64.md even:
```
(define_peephole2
  [(set (match_operand:GPI 0 "aarch64_general_reg")
        (minus:GPI (match_operand:GPI 1 "aarch64_reg_or_zero")
                    (match_operand:GPI 2 "aarch64_reg_or_zero")))
   (set (reg:CC CC_REGNUM)
        (compare:CC
          (match_dup 1)
          (match_dup 2)))]
  "!reg_overlap_mentioned_p (operands[0], operands[1])
   && !reg_overlap_mentioned_p (operands[0], operands[2])"
  [(const_int 0)]
  {
    emit_insn (gen_sub<mode>3_compare1 (operands[0], operands[1],
                                         operands[2]));
    DONE;
  }
)
...
```

Reply via email to