-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Open
Labels
Description
Currently compiles to:
foo:
mov rax, rdi
or rax, rsi
or rax, rdx
not rax
retShould be:
foo:
not rdx
or rdi, rsi
andn rax, rdi, rdx
retThe difference is that the first snippet is going to take 3 cycles to execute because there is a serial dependency chain between all 3 operations. The second snippet can take 2 cycles to execute because the not and the or can run in the same cycle.