https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109057
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >basically discarding it No it is not. you just don't notice it there because goldbolt is hiding things because it thinks it is unused. If you use: asm volatile("#%0" : : "rm"(value) : "memory"); You get: #LUT(%rdi) Which is exactly what you expect.