diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-23 22:46:04 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-23 22:46:04 +0300 |
commit | b1c49bd22d0e51543f7eecc27126e1f9bb0787f8 (patch) | |
tree | 09f53d60236eee93efaf422e190476e2633148b5 /tests | |
parent | 332d1f86914b406af84f7e178379d144805a109f (diff) |
Improve test/cases/uadd_overflow_64_ta2.ll to check that the tricky addition case 0xFFFFFFFFFFFFFFFF + 0x0000000100000001 is handled correctly.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cases/uadd_overflow_64_ta2.ll | 6 | ||||
-rw-r--r-- | tests/cases/uadd_overflow_64_ta2.txt | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/cases/uadd_overflow_64_ta2.ll b/tests/cases/uadd_overflow_64_ta2.ll index a4f3e40b..6dfbc1e5 100644 --- a/tests/cases/uadd_overflow_64_ta2.ll +++ b/tests/cases/uadd_overflow_64_ta2.ll @@ -19,6 +19,12 @@ entry: %b2 = zext i1 %b1 to i32 call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str2, i32 0, i32 0), i64 %b0, i32 %b2) ; [#uses=0] + %uadd3 = tail call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 4294967297, i64 18446744073709551615) + %c0 = extractvalue { i64, i1 } %uadd3, 0 + %c1 = extractvalue { i64, i1 } %uadd3, 1 + %c2 = zext i1 %c1 to i32 + call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str2, i32 0, i32 0), i64 %c0, i32 %c2) ; [#uses=0] + ret i32 1 } diff --git a/tests/cases/uadd_overflow_64_ta2.txt b/tests/cases/uadd_overflow_64_ta2.txt index f5711309..2abb084c 100644 --- a/tests/cases/uadd_overflow_64_ta2.txt +++ b/tests/cases/uadd_overflow_64_ta2.txt @@ -1,2 +1,3 @@ *2705,1* *10c6f7a0dcfc,0* +*100000000,1*
\ No newline at end of file |