aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-01-21 02:09:05 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-01-21 02:09:05 +0000
commitaaf414c92c0247025d6cf31f684895fad7b4c293 (patch)
treed3407027ef95dfdb0c5c2f85de2c6c59d49d77d9 /test/CodeGen
parent677eae3d964d6d9f2d676828aa2dc27542fbef2b (diff)
downloadexternal_llvm-aaf414c92c0247025d6cf31f684895fad7b4c293.zip
external_llvm-aaf414c92c0247025d6cf31f684895fad7b4c293.tar.gz
external_llvm-aaf414c92c0247025d6cf31f684895fad7b4c293.tar.bz2
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
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/xor_not.ll2
1 files changed, 1 insertions, 1 deletions
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: