Open
Description
int f(int *a) {
if (*a & 1234)
return 0;
return 1;
}
bash$ gcc -O2 -S 1.c -o -
.file "1.c"
.text
.p2align 4
.globl f
.type f, @function
f:
.LFB0:
.cfi_startproc
xorl %eax, %eax
testl $1234, (%rdi)
sete %al
ret
bash$ clang -O2 -S 1.c -o -
.text
.file "1.c"
.globl f # -- Begin function f
.p2align 4, 0x90
.type f,@function
f: # @f
.cfi_startproc
# %bb.0: # %entry
movzwl (%rdi), %ecx
xorl %eax, %eax
testl $1234, %ecx # imm = 0x4D2
sete %al
retq