[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 22 21:17:55 PST 2006
Changes in directory llvm/lib/Target/X86:
README.txt updated: 1.59 -> 1.60
---
Log message:
add a small and simple case.
---
Diffs of the changes: (+28 -0)
README.txt | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+)
Index: llvm/lib/Target/X86/README.txt
diff -u llvm/lib/Target/X86/README.txt:1.59 llvm/lib/Target/X86/README.txt:1.60
--- llvm/lib/Target/X86/README.txt:1.59 Wed Feb 22 20:50:21 2006
+++ llvm/lib/Target/X86/README.txt Wed Feb 22 23:17:43 2006
@@ -506,3 +506,31 @@
//===---------------------------------------------------------------------===//
Select (add, x, GlobalAddress) to ADD32ri, etc. when it's appropriate.
+
+//===---------------------------------------------------------------------===//
+
+The first BB of this code:
+
+declare bool %foo()
+int %bar() {
+ %V = call bool %foo()
+ br bool %V, label %T, label %F
+T:
+ ret int 1
+F:
+ call bool %foo()
+ ret int 12
+}
+
+compiles to:
+
+_bar:
+ subl $12, %esp
+ call L_foo$stub
+ xorb $1, %al
+ testb %al, %al
+ jne LBB_bar_2 # F
+
+It would be better to emit "cmp %al, 1" than a xor and test.
+
+
More information about the llvm-commits
mailing list