[llvm] r326658 - [X86] This bit-test TODO has been moved in PR36551

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 3 08:31:17 PST 2018


Author: rksimon
Date: Sat Mar  3 08:31:17 2018
New Revision: 326658

URL: http://llvm.org/viewvc/llvm-project?rev=326658&view=rev
Log:
[X86] This bit-test TODO has been moved in PR36551

Modified:
    llvm/trunk/lib/Target/X86/README.txt

Modified: llvm/trunk/lib/Target/X86/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=326658&r1=326657&r2=326658&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/README.txt (original)
+++ llvm/trunk/lib/Target/X86/README.txt Sat Mar  3 08:31:17 2018
@@ -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; }
 




More information about the llvm-commits mailing list