add a small and simple case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26326 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-02-23 05:17:43 +00:00
parent 3032410f9b
commit 205065ae0c

View 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.