https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115755
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Hongtao Liu from comment #1) > mulx doesn't support imm operand, a register is still needed to put 123. > mulq is used func/func1 should be ok. Right, but mulx does not set the flags so it should be better to move around and such. clang produces mulx for this. func: # @func .cfi_startproc # %bb.0: movl $123, %eax movq %rdi, %rdx mulxq %rax, %rax, %rax retq func1: # @func1 .cfi_startproc # %bb.0: movl $123, %eax movq %rdi, %rdx mulxq %rax, %rax, %rdx retq