aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-05 18:58:30 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 14:23:23 -0800
commit0d1f1ce225293a3683e87447bcc787cf2da8d7bd (patch)
treeb1e18fe06b54a88c1f0d3d7e4122d62fcfe6aac6 /tests
parent94ca29f86bf44bd7b072113093625e079266ae93 (diff)
legalize insertvalue
Diffstat (limited to 'tests')
-rw-r--r--tests/cases/uadd_overflow.ll7
-rw-r--r--tests/cases/uadd_overflow.txt1
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/cases/uadd_overflow.ll b/tests/cases/uadd_overflow.ll
index a808b9de..dfbf199b 100644
--- a/tests/cases/uadd_overflow.ll
+++ b/tests/cases/uadd_overflow.ll
@@ -15,6 +15,13 @@ entry:
%a1 = extractvalue { i32, i1 } %uadd1, 1
%a2 = zext i1 %a1 to i32
call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str2, i32 0, i32 0), i32 %a0, i32 %a2) ; [#uses=0]
+ %buadd1prepre = tail call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 %mul7, i32 %shl10)
+ %buadd1pre = insertvalue { i32, i1 } %buadd1prepre, i1 0, 1
+ %buadd1 = insertvalue { i32, i1 } %buadd1pre, i32 5177, 0
+ %ba0 = extractvalue { i32, i1 } %buadd1, 0
+ %ba1 = extractvalue { i32, i1 } %buadd1, 1
+ %ba2 = zext i1 %ba1 to i32
+ call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str2, i32 0, i32 0), i32 %ba0, i32 %ba2) ; [#uses=0]
ret i32 1
}
diff --git a/tests/cases/uadd_overflow.txt b/tests/cases/uadd_overflow.txt
index dcda9240..6e65c896 100644
--- a/tests/cases/uadd_overflow.txt
+++ b/tests/cases/uadd_overflow.txt
@@ -1 +1,2 @@
*3319578,1*
+*5177,0*