The next patch will rename the "rlwinm" pattern (as well as the other patterns that implement rlwinm, now unnamed). The only place that uses gen_rlwinm (an expander) is better off expanding the separate operations separately. Do so.
Okay for trunk? Segher 2015-05-10 Segher Boessenkool <seg...@kernel.crashing.org> * config/rs6000/rs6000.md (rs6000_adjust_atomic_subword): Use gen_ashlsi3 and gen_andsi3 instead of gen_rlwinm. --- gcc/config/rs6000/rs6000.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 7c59ac8..e5b8edd 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20577,7 +20577,9 @@ rs6000_adjust_atomic_subword (rtx orig_mem, rtx *pshift, rtx *pmask) /* Shift amount for subword relative to aligned word. */ shift = gen_reg_rtx (SImode); addr = gen_lowpart (SImode, addr); - emit_insn (gen_rlwinm (shift, addr, GEN_INT (3), GEN_INT (shift_mask))); + rtx tmp = gen_reg_rtx (SImode); + emit_insn (gen_ashlsi3 (tmp, addr, GEN_INT (3))); + emit_insn (gen_andsi3 (shift, tmp, GEN_INT (shift_mask))); if (BYTES_BIG_ENDIAN) shift = expand_simple_binop (SImode, XOR, shift, GEN_INT (shift_mask), shift, 1, OPTAB_LIB_WIDEN); -- 1.8.1.4