diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2020-10-02 00:06:56 +0000 |
---|---|---|
committer | Segher Boessenkool <segher@kernel.crashing.org> | 2020-11-06 23:59:15 +0000 |
commit | 1a0f964e4d100a39eb388ea68b71d870f5de2049 (patch) | |
tree | 4b70eb07aa293f43b8a49fd93f06594a0ca4a836 /gcc | |
parent | 4959bedcc8ca61161017b3a83edfe9e5a7b64cd9 (diff) | |
download | gcc-1a0f964e4d100a39eb388ea68b71d870f5de2049.zip gcc-1a0f964e4d100a39eb388ea68b71d870f5de2049.tar.gz gcc-1a0f964e4d100a39eb388ea68b71d870f5de2049.tar.bz2 |
rs6000: Don't use operands[] for temporaries in define_expand
In ac001f5ce604 Alan fixed my thinko using operands that do not refer
to anything mentioned in the RTL pattern. Instead, it just uses fresh
new local rtxes for those.
This patch takes that a tiny bit further: it uses local rtx for all
temporaries used in the expanders. As a bonus that simplifies the code
a tiny bit as well.
2020-11-06 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (@tablejump<mode>_normal): Don't abuse
operands[].
(@tablejump<mode>_nospec): Ditto.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index acbf130..5e5ad9f 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -12732,14 +12732,11 @@ (use (match_operand:P 1))] "rs6000_speculate_indirect_jumps" { - rtx off; - operands[0] = force_reg (SImode, operands[0]); - if (<MODE>mode == SImode) - off = operands[0]; - else + rtx off = force_reg (SImode, operands[0]); + if (<MODE>mode != SImode) { + rtx src = gen_rtx_fmt_e (SIGN_EXTEND, Pmode, off); off = gen_reg_rtx (Pmode); - rtx src = gen_rtx_fmt_e (SIGN_EXTEND, Pmode, operands[0]); emit_move_insn (off, src); } @@ -12757,14 +12754,11 @@ (use (match_operand:CC 2))] "!rs6000_speculate_indirect_jumps" { - rtx off; - operands[0] = force_reg (SImode, operands[0]); - if (<MODE>mode == SImode) - off = operands[0]; - else + rtx off = force_reg (SImode, operands[0]); + if (<MODE>mode != SImode) { + rtx src = gen_rtx_fmt_e (SIGN_EXTEND, Pmode, off); off = gen_reg_rtx (Pmode); - rtx src = gen_rtx_fmt_e (SIGN_EXTEND, Pmode, operands[0]); emit_move_insn (off, src); } |