]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[i386] Set all_regs to true in the call to replace_rtx [PR102057]
authorUros Bizjak <ubizjak@gmail.com>
Thu, 26 Aug 2021 15:26:06 +0000 (17:26 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Thu, 26 Aug 2021 15:27:05 +0000 (17:27 +0200)
We want to replace all REGs equal to FROM.

2021-08-26  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
PR target/102057
* config/i386/i386.md (cmove reg-reg move elimination peephole2s):
Set all_regs to true in the call to replace_rtx.

gcc/config/i386/i386.md

index 41d85623ad69f7ef3c338df8db9407f21b2f9568..c80dcb57a1846755f044d76a2c0ea855900302f1 100644 (file)
                                          (match_dup 0)))]
 {
   operands[7] = SET_DEST (XVECEXP (PATTERN (peep2_next_insn (1)), 0, 0));
-  operands[8] = replace_rtx (operands[5], operands[0], operands[1]);
-  operands[9] = replace_rtx (operands[6], operands[0], operands[1]);
+  operands[8] = replace_rtx (operands[5], operands[0], operands[1], true);
+  operands[9] = replace_rtx (operands[6], operands[0], operands[1], true);
 })
 
 ;; Eliminate a reg-reg mov by inverting the condition of a cmov (#2).
                                          (match_dup 0)))]
 {
   operands[7] = SET_DEST (XVECEXP (PATTERN (peep2_next_insn (2)), 0, 0));
-  operands[8] = replace_rtx (operands[5], operands[0], operands[1]);
-  operands[9] = replace_rtx (operands[6], operands[0], operands[1]);
+  operands[8] = replace_rtx (operands[5], operands[0], operands[1], true);
+  operands[9] = replace_rtx (operands[6], operands[0], operands[1], true);
 })
 
 (define_expand "mov<mode>cc"