This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386] PR47698 no CMOV for volatile mem
On 10/28/2011 05:49 AM, Sergey Ostanevich wrote:
> - the code for CMOV is under #ifdef in the mddle-end, which is
> explicitly marked as "have to be removed" (ifcvt.c:1446)
> - I have no clear evidence all platforms that support conditional move
> have the same semantics that lead to the PR
We're on solid ground here. The arguments are assumed to always be
evaluated in RTL, *except* in the case of COND_EXEC. Only true
predication can avoid an exception or side effects of touching memory.
> I think the best way to address both concerns is to implement code
> that relies on Ð new hookup "volatile-safe CMOV" that is false by
> default.
We do not need a new hook.
r~