From aaf414c92c0247025d6cf31f684895fad7b4c293 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 21 Jan 2009 02:09:05 +0000 Subject: Favors generating "not" over "xor -1". For example. unsigned test(unsigned a) { return ~a; } llvm used to generate: movl $4294967295, %eax xorl 4(%esp), %eax Now it generates: movl 4(%esp), %eax notl %eax It's 3 bytes shorter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62661 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/xor_not.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/CodeGen') diff --git a/test/CodeGen/X86/xor_not.ll b/test/CodeGen/X86/xor_not.ll index 1e89ca8..0b1abdf 100644 --- a/test/CodeGen/X86/xor_not.ll +++ b/test/CodeGen/X86/xor_not.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep {not\[lwb\]} | count 3 +; RUN: llvm-as < %s | llc -march=x86 | grep {not\[lwb\]} | count 4 ; RUN: llvm-as < %s | llc -march=x86-64 | grep {not\[lwb\]} | count 4 define i32 @test(i32 %a, i32 %b) nounwind { entry: -- cgit v1.1