add a small and simple case.
authorChris Lattner <sabre@nondot.org>
Thu, 23 Feb 2006 05:17:43 +0000 (05:17 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 23 Feb 2006 05:17:43 +0000 (05:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index f479712d7c533c9f61d22e49d8b1ce33143b7fbc..941d52294b9dd7b06d43f718695fa2febc411619 100644 (file)
@@ -506,3 +506,31 @@ and ISD::FMAX node types?
 //===---------------------------------------------------------------------===//
 
 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.
+
+