diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-08 20:44:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-08 20:44:19 +0000 |
commit | be685cc72a52a297c217384763b25cfe1c94e80b (patch) | |
tree | 056114d3952edd0d8e3c173c577a3a12fd759997 /lib/Target/X86/README.txt | |
parent | 4a2f112a5c774cb1ab3fd890a88ba1db9709f561 (diff) | |
download | external_llvm-be685cc72a52a297c217384763b25cfe1c94e80b.zip external_llvm-be685cc72a52a297c217384763b25cfe1c94e80b.tar.gz external_llvm-be685cc72a52a297c217384763b25cfe1c94e80b.tar.bz2 |
add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r-- | lib/Target/X86/README.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index eb110fe..2b867f4 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -1831,3 +1831,34 @@ unsigned long f2(struct s2 x) { //===---------------------------------------------------------------------===// +We currently compile this: + +define i32 @func1(i32 %v1, i32 %v2) nounwind { +entry: + %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %v1, i32 %v2) + %sum = extractvalue {i32, i1} %t, 0 + %obit = extractvalue {i32, i1} %t, 1 + br i1 %obit, label %overflow, label %normal +normal: + ret i32 %sum +overflow: + call void @llvm.trap() + unreachable +} +declare {i32, i1} @llvm.sadd.with.overflow.i32(i32, i32) +declare void @llvm.trap() + +to: + +_func1: + movl 4(%esp), %eax + addl 8(%esp), %eax + jo LBB1_2 ## overflow +LBB1_1: ## normal + ret +LBB1_2: ## overflow + ud2 + +it would be nice to produce "into" someday. + +//===---------------------------------------------------------------------===// |