diff options
author | Chris Lattner <sabre@nondot.org> | 2010-12-19 20:03:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-12-19 20:03:11 +0000 |
commit | 1e8c032a6e1e946d8d5dba4f9cf5e86a9528ec44 (patch) | |
tree | 0d54f8aa8a1d34cad67cbe93d1b68f44ed0a2bd1 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 405c28bc7d4f15deb65a6a061c7604eea92c1bc7 (diff) | |
download | bcm5719-llvm-1e8c032a6e1e946d8d5dba4f9cf5e86a9528ec44.tar.gz bcm5719-llvm-1e8c032a6e1e946d8d5dba4f9cf5e86a9528ec44.zip |
X86 supports i8/i16 overflow ops (except i8 multiplies), we should
generate them.
Now we compile:
define zeroext i8 @X(i8 signext %a, i8 signext %b) nounwind ssp {
entry:
%0 = tail call %0 @llvm.sadd.with.overflow.i8(i8 %a, i8 %b)
%cmp = extractvalue %0 %0, 1
br i1 %cmp, label %if.then, label %if.end
into:
_X: ## @X
## BB#0: ## %entry
subl $12, %esp
movb 16(%esp), %al
addb 20(%esp), %al
jo LBB0_2
Before we were generating:
_X: ## @X
## BB#0: ## %entry
pushl %ebp
movl %esp, %ebp
subl $8, %esp
movb 12(%ebp), %al
testb %al, %al
setge %cl
movb 8(%ebp), %dl
testb %dl, %dl
setge %ah
cmpb %cl, %ah
sete %cl
addb %al, %dl
testb %dl, %dl
setge %al
cmpb %al, %ah
setne %al
andb %cl, %al
testb %al, %al
jne LBB0_2
llvm-svn: 122186
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
0 files changed, 0 insertions, 0 deletions