1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

add a note.

llvm-svn: 64093
This commit is contained in:
Chris Lattner 2009-02-08 20:44:19 +00:00
parent f6b4b170b6
commit a50a554333

View File

@ -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.
//===---------------------------------------------------------------------===//