+2015-05-12 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.md (rs6000_adjust_atomic_subword): Use
+ gen_ashlsi3 and gen_andsi3 instead of gen_rlwinm.
+
2015-05-12 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (extzv): FAIL for SImode.
/* 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);