Without cpu_relax(), it becomes a infinite loop, for the compiler can’t see x is change in the loop body. Using the inline assembly, namely
memory clobber, the compiler relinquishes the assumption that x is kept intact, and reloads it each iteration. In addition, the compiler is smart
enough to only flush global visible variables.