On 07/30/2012 08:40 AM, Ulrich Weigand wrote: >> > I presume a good test case to examine for ICM is with such an operand >> > coming from a global. What about STCM? I don't see the output from >> > sync_compare_and_swap ever being allowed in memory... > Actually, it's only ICM that is of interest here; it should get used when > either the comparison value or the "new" value come from a memory location, > e.g. a global. Sorry, I was confused about STCM ... >
Well... it turns out to be just about impossible to get this to trigger. With optimization on, the middle-end decides to promote the parameters to registers immediately, which means that we never see a MEM in the expander. With optimization off, we don't propagate enough alignment info so we never see ac.aligned = true. It does look like we could relax the MEM_P requirement for Z10, so that we use the register-based insv (RISBG). I'll give that a go... r~