Open Validark opened 3 weeks ago
foo:
mov rax, rsi
or rax, rdi
or rax, rdx
or rax, rcx
+ xor r10d, r10d
- je .LBB0_1
+ je .LBB0_2
push r15
push r14
push rbx
- xor r10d, r10d
.LBB0_4:
xor
overwrites the flags need by the je
, but it could be placed above the or
xor
overwrites the flags need by theje
, but it could be placed above theor
Good point! I didn't even think about that, haha.
I have encountered this many times, but here's how I triggered this behavior recently:
Zig godbolt link
LLVM godbolt link