diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-27 17:51:39 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-27 17:51:39 -0800 |
commit | 49d7f0d857192ff18291e9a87997d3b6015fc4e3 (patch) | |
tree | 9393c97e4e6dc31295a48d03442d23314bc3920a /tests | |
parent | c540f3f36a4297187aab59dd0dd8cf08fbbb7867 (diff) |
properly handle illegal phi literals
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cases/legalizer_ta2.ll | 12 | ||||
-rw-r--r-- | tests/cases/legalizer_ta2.txt | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/cases/legalizer_ta2.ll b/tests/cases/legalizer_ta2.ll index bb7220c8..fbb5dc5d 100644 --- a/tests/cases/legalizer_ta2.ll +++ b/tests/cases/legalizer_ta2.ll @@ -116,6 +116,18 @@ a26: store i88 %a27, i88* bitcast ([300 x i8]* @globaliz to i88*), align 4 call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*)) +; phi with constants + br i1 %if, label %a17b, label %a26b + +a17b: + br label %a26b + +a26b: + %a27b = phi i64 [ 55, %a26 ], [ 57, %a17b ] + store i104 0, i104* %bundled, align 4 ; wipe it out + store i64 %a27b, i64* bitcast ([300 x i8]* @globaliz to i64*), align 4 + call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*)) + store i104 %ored, i104* %bundled, align 4 %iff = zext i1 %if to i64 switch i64 %iff, label %a50 [ diff --git a/tests/cases/legalizer_ta2.txt b/tests/cases/legalizer_ta2.txt index 93ea1e23..c57b20f5 100644 --- a/tests/cases/legalizer_ta2.txt +++ b/tests/cases/legalizer_ta2.txt @@ -16,6 +16,7 @@ hello, war`d hello, wor-d hello, wor hello, worl +9 hello, war`d hello, world hello, w |