OSDN Git Service

[X86] This bit-test TODO has been moved in PR36551
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 3 Mar 2018 16:31:17 +0000 (16:31 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 3 Mar 2018 16:31:17 +0000 (16:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326658 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 11652af..c06a7b1 100644 (file)
@@ -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; }