[llvm] [CodeGen] Fix MachineInstr::isSafeToMove handling of inline asm. (PR #126807)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 12:27:16 PST 2025


efriedma-quic wrote:

Ping

It looks like with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102150, gcc now has the behavior proposed in this patch.

> I don't get the point of the example. If the use of cpuid instruction may trap, why don't add volatile? Without it, the example shown in GCC document is already broken.

This is just making the point that nobody actually expects this, as shown by the fact that even compiler developers don't expect this.  (Obviously we control the implementation of our cpuid.h.)

https://github.com/llvm/llvm-project/pull/126807


More information about the llvm-commits mailing list