summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-02 18:31:38 +0000
committerChris Lattner <sabre@nondot.org>2011-01-02 18:31:38 +0000
commit51415d26f15022b008cf730a16ed38a3177155f3 (patch)
treeedf98d45fdb1d707be91645b3a7b6e4dd3411996 /llvm/lib/Target/X86
parent64f1c0dcda41011f76ed66b5eb986d2d7a161a4e (diff)
downloadbcm5719-llvm-51415d26f15022b008cf730a16ed38a3177155f3.tar.gz
bcm5719-llvm-51415d26f15022b008cf730a16ed38a3177155f3.zip
update a bunch of entries.
llvm-svn: 122700
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/README.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt
index 4005431b75a..551d9f08526 100644
--- a/llvm/lib/Target/X86/README.txt
+++ b/llvm/lib/Target/X86/README.txt
@@ -1507,6 +1507,8 @@ loop, the value comes into the loop as two values, and
RegsForValue::getCopyFromRegs doesn't know how to put an AssertSext on the
constructed BUILD_PAIR which represents the cast value.
+This can be handled by making CodeGenPrepare sink the cast.
+
//===---------------------------------------------------------------------===//
Test instructions can be eliminated by using EFLAGS values from arithmetic
@@ -1847,3 +1849,38 @@ _foo:
0 is the only unsigned number < 1.
//===---------------------------------------------------------------------===//
+
+This code:
+
+%0 = type { i32, i1 }
+
+define i32 @add32carry(i32 %sum, i32 %x) nounwind readnone ssp {
+entry:
+ %uadd = tail call %0 @llvm.uadd.with.overflow.i32(i32 %sum, i32 %x)
+ %cmp = extractvalue %0 %uadd, 1
+ %inc = zext i1 %cmp to i32
+ %add = add i32 %x, %sum
+ %z.0 = add i32 %add, %inc
+ ret i32 %z.0
+}
+
+declare %0 @llvm.uadd.with.overflow.i32(i32, i32) nounwind readnone
+
+compiles to:
+
+_add32carry: ## @add32carry
+ addl %esi, %edi
+ sbbl %ecx, %ecx
+ movl %edi, %eax
+ subl %ecx, %eax
+ ret
+
+But it could be:
+
+_add32carry:
+ leal (%rsi,%rdi), %eax
+ cmpl %esi, %eax
+ adcl $0, %eax
+ ret
+
+//===---------------------------------------------------------------------===//
OpenPOWER on IntegriCloud