From: Uros Bizjak Date: Wed, 30 Dec 2020 16:41:21 +0000 (+0100) Subject: i386: Remove unnecessary clobbers from combine splitters. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0696141107d61483f38482b941549959a0d7f613;p=gcc.git i386: Remove unnecessary clobbers from combine splitters. There is no need for combine splitters to emit insn patterns with clobbers, the pass is smart enough to add clobbers to patterns as necessary. 2020-12-30 Uroš Bizjak gcc/ * config/i386/i386.md: Remove unnecessary clobbers from combine splitters. --- diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index d7cd3df995c..ea1a0706dcb 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -12693,12 +12693,10 @@ [(not:SWI (match_operand:SWI 2 "register_operand")) (match_operand:SWI 3 "nonimmediate_operand")]))] "" - [(parallel - [(set (reg:CCC FLAGS_REG) - (compare:CCC - (plus:SWI (match_dup 2) (match_dup 3)) - (match_dup 2))) - (clobber (scratch:SWI))]) + [(set (reg:CCC FLAGS_REG) + (compare:CCC + (plus:SWI (match_dup 2) (match_dup 3)) + (match_dup 2))) (set (match_dup 0) (match_op_dup 1 [(reg:CCC FLAGS_REG) (const_int 0)]))]) @@ -12709,12 +12707,10 @@ (match_operand 3 "const_int_operand")]))] "TARGET_64BIT && IN_RANGE (exact_log2 (UINTVAL (operands[3]) + 1), 32, 63)" - [(parallel - [(set (reg:CCZ FLAGS_REG) - (compare:CCZ - (lshiftrt:DI (match_dup 2) (match_dup 4)) - (const_int 0))) - (clobber (scratch:DI))]) + [(set (reg:CCZ FLAGS_REG) + (compare:CCZ + (lshiftrt:DI (match_dup 2) (match_dup 4)) + (const_int 0))) (set (match_dup 0) (match_op_dup 1 [(reg:CCZ FLAGS_REG) (const_int 0)]))] { @@ -12905,12 +12901,10 @@ (label_ref (match_operand 0)) (pc)))] "" - [(parallel - [(set (reg:CCC FLAGS_REG) - (compare:CCC - (plus:SWI (match_dup 2) (match_dup 3)) - (match_dup 2))) - (clobber (scratch:SWI))]) + [(set (reg:CCC FLAGS_REG) + (compare:CCC + (plus:SWI (match_dup 2) (match_dup 3)) + (match_dup 2))) (set (pc) (if_then_else (match_op_dup 1 [(reg:CCC FLAGS_REG) (const_int 0)]) (label_ref (match_operand 0)) @@ -12926,12 +12920,10 @@ (pc)))] "TARGET_64BIT && IN_RANGE (exact_log2 (UINTVAL (operands[3]) + 1), 32, 63)" - [(parallel - [(set (reg:CCZ FLAGS_REG) - (compare:CCZ - (lshiftrt:DI (match_dup 2) (match_dup 4)) - (const_int 0))) - (clobber (scratch:DI))]) + [(set (reg:CCZ FLAGS_REG) + (compare:CCZ + (lshiftrt:DI (match_dup 2) (match_dup 4)) + (const_int 0))) (set (pc) (if_then_else (match_op_dup 1 [(reg:CCZ FLAGS_REG) (const_int 0)]) (label_ref (match_operand 0)) @@ -18581,9 +18573,8 @@ && INTVAL (operands[2]) != -1 && INTVAL (operands[2]) != 2147483647" [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2))) - (parallel [(set (match_dup 0) - (neg:SWI48 (ltu:SWI48 (reg:CC FLAGS_REG) (const_int 0)))) - (clobber (reg:CC FLAGS_REG))])] + (set (match_dup 0) + (neg:SWI48 (ltu:SWI48 (reg:CC FLAGS_REG) (const_int 0))))] "operands[2] = GEN_INT (INTVAL (operands[2]) + 1);") (define_split @@ -18594,9 +18585,8 @@ (const_int 0))))] "" [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (const_int 1))) - (parallel [(set (match_dup 0) - (neg:SWI (ltu:SWI (reg:CC FLAGS_REG) (const_int 0)))) - (clobber (reg:CC FLAGS_REG))])]) + (set (match_dup 0) + (neg:SWI (ltu:SWI (reg:CC FLAGS_REG) (const_int 0))))]) (define_split [(set (match_operand:SWI 0 "register_operand") @@ -18605,13 +18595,10 @@ (match_operand 1 "int_nonimmediate_operand") (const_int 0))))] "" - [(parallel [(set (reg:CCC FLAGS_REG) - (ne:CCC (match_dup 1) (const_int 0))) - (clobber (match_dup 2))]) - (parallel [(set (match_dup 0) - (neg:SWI (ltu:SWI (reg:CCC FLAGS_REG) (const_int 0)))) - (clobber (reg:CC FLAGS_REG))])] - "operands[2] = gen_rtx_SCRATCH (GET_MODE (operands[1]));") + [(set (reg:CCC FLAGS_REG) + (ne:CCC (match_dup 1) (const_int 0))) + (set (match_dup 0) + (neg:SWI (ltu:SWI (reg:CCC FLAGS_REG) (const_int 0))))]) (define_insn "*movcc_noc" [(set (match_operand:SWI248 0 "register_operand" "=r,r")