https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118916

--- Comment #2 from Tomas Chang <changyp6 at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> There is no ignoring volatile here since the exact memory locations are
> written.
> 
> Rather you have a memory location which needs to be written using an exact
> instruction which has no post increment.
> 
> Thus would mean the definition of __raw_writel is incorrect and you have to
> use inline-asm to not get the increment for the address.

Hi Andrew,
Many thanks to your reply.

My question is that the same code runs successfully if it is compiled with GCC
12 using -O3 optimization.

-O3 and -O3 -fdisable-rtl-cse2 generates the same code by GCC 12

Reply via email to