https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65955
ktkachov at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ktkachov at gcc dot gnu.org --- Comment #4 from ktkachov at gcc dot gnu.org --- > > Aforementioned split (and define_insn) as a whole: > ... > 9306 (define_insn_and_split "movcond_addsi" > 9307 [(set (match_operand:SI 0 "s_register_operand" "=r,l,r") > 9308 (if_then_else:SI > 9309 (match_operator 5 "comparison_operator" > 9310 [(plus:SI (match_operand:SI 3 "s_register_operand" "r,r,r") > 9311 (match_operand:SI 4 "arm_add_operand" > "rIL,rIL,rIL")) > 9312 (const_int 0)]) > 9313 (match_operand:SI 1 "arm_rhs_operand" "rI,rPy,r") > 9314 (match_operand:SI 2 "arm_rhs_operand" "rI,rPy,r"))) > 9315 (clobber (reg:CC CC_REGNUM))] > 9316 "TARGET_32BIT" > 9317 "#" > 9318 "&& reload_completed" > 9319 [(set (reg:CC_NOOV CC_REGNUM) > 9320 (compare:CC_NOOV > 9321 (plus:SI (match_dup 3) > 9322 (match_dup 4)) > 9323 (const_int 0))) > 9324 (set (match_dup 0) (match_dup 1)) > 9325 (cond_exec (match_dup 6) > 9326 (set (match_dup 0) (match_dup 2)))] > 9327 " > 9328 { > 9329 machine_mode mode = SELECT_CC_MODE (GET_CODE (operands[5]), > 9330 operands[3], > operands[4]); > 9331 enum rtx_code rc = GET_CODE (operands[5]); > 9332 operands[6] = gen_rtx_REG (mode, CC_REGNUM); > 9333 gcc_assert (!(mode == CCFPmode || mode == CCFPEmode)); > 9334 if (REGNO (operands[2]) != REGNO (operands[0])) > 9335 rc = reverse_condition (rc); > 9336 else > 9337 std::swap (operands[1], operands[2]); > 9338 > 9339 operands[6] = gen_rtx_fmt_ee (rc, VOIDmode, operands[6], Seems like the check on operands[2] should be: if (!REG_P (operands[2]) || REGNO (operands[2]) != REGNO (operands[0])) rc = reverse_condition (rc); else std::swap (operands[1], operands[2]);