This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: powerpc compare_and_swap fails
On 11/17/2011 12:37 AM, Alan Modra wrote:
> - oldval = convert_modes (SImode, mode, oldval, 1);
> + oldval = gen_reg_rtx (SImode);
> + convert_move (oldval, orig, 1);
> oldval = expand_simple_binop (SImode, ASHIFT, oldval, shift,
> oldval, 1, OPTAB_LIB_WIDEN);
Gah. From convert_modes, oldval is a subreg, and modifying that
subreg gets us into all sorts of trouble. The fix should be as
simple as
- oldval, 1, OPTAB_LIB_WIDEN);
+ NULL_RTX, 1, OPTAB_LIB_WIDEN);
so that we don't write back into the subreg.
r~