From 6583c8a76ba0a24d6c18b878da5d649cf6817e9e Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sat, 3 Mar 2018 16:31:17 +0000 Subject: [PATCH] [X86] This bit-test TODO has been moved in PR36551 llvm-svn: 326658 --- lib/Target/X86/README.txt | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 11652af9f1f..c06a7b1ade6 100644 --- a/lib/Target/X86/README.txt +++ b/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; }