diff options
-rw-r--r-- | llvm/lib/Target/X86/README.txt | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index 11652af9f1f..c06a7b1ade6 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -1436,30 +1436,6 @@ bar: //===---------------------------------------------------------------------===// -Consider the following two functions compiled with clang: -_Bool foo(int *x) { return !(*x & 4); } -unsigned bar(int *x) { return !(*x & 4); } - -foo: - movl 4(%esp), %eax - testb $4, (%eax) - sete %al - movzbl %al, %eax - ret - -bar: - movl 4(%esp), %eax - movl (%eax), %eax - shrl $2, %eax - andl $1, %eax - xorl $1, %eax - ret - -The second function generates more code even though the two functions are -are functionally identical. - -//===---------------------------------------------------------------------===// - Take the following C code: int f(int a, int b) { return (unsigned char)a == (unsigned char)b; } |