[llvm-commits] CVS: llvm/lib/Target/X86/README.txt

Chris Lattner lattner at cs.uiuc.edu
Thu May 18 10:38:28 PDT 2006



Changes in directory llvm/lib/Target/X86:

README.txt updated: 1.106 -> 1.107
---
Log message:

add a note


---
Diffs of the changes:  (+15 -0)

 README.txt |   15 +++++++++++++++
 1 files changed, 15 insertions(+)


Index: llvm/lib/Target/X86/README.txt
diff -u llvm/lib/Target/X86/README.txt:1.106 llvm/lib/Target/X86/README.txt:1.107
--- llvm/lib/Target/X86/README.txt:1.106	Wed May 17 16:20:51 2006
+++ llvm/lib/Target/X86/README.txt	Thu May 18 12:38:16 2006
@@ -380,6 +380,21 @@
 
 This may just be a matter of using 'test' to write bigger patterns for X86cmp.
 
+An important case is comparison against zero:
+
+if (X == 0) ...
+
+instead of:
+
+	cmpl $0, %eax
+	je LBB4_2	#cond_next
+
+use:
+	test %eax, %eax
+	jz LBB4_2
+
+which is smaller.
+
 //===---------------------------------------------------------------------===//
 
 SSE should implement 'select_cc' using 'emulated conditional moves' that use






More information about the llvm-commits mailing list