https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881
--- Comment #68 from Julian Waters <tanksherman27 at gmail dot com> --- I don't know why but apparently using force_reg and copy_to_mode_reg to load into registers instead of using gen_rtx_SET and emit_insn fixes the garbage movabsq instructions. I was going to ask why, but I suspect the reason is buried so deeply in gcc's source code and is such an edge case that others probably don't know why this is happening either