diff options
author | Chris Lattner <sabre@nondot.org> | 2006-02-23 05:17:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-02-23 05:17:43 +0000 |
commit | 205065ae0ccbc0c4910746c216df8d5e523ee159 (patch) | |
tree | a54da1907bc229d48de472fedb359ac1d8685f86 | |
parent | 3032410f9b4c5eade542bd39ce7253c64b27790a (diff) |
add a small and simple case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26326 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/README.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index f479712d7c..941d52294b 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -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. + + |