aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-27 11:39:30 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-27 11:39:30 -0800
commit2de8bb327d67075c339531ab23300200fb8714de (patch)
treebe441ac15fee6ade2baadad8971daf741fa7816a /tests
parentf5601d0f69dda3fca34beb84537d52f6b8d0e927 (diff)
legalize switch i64
Diffstat (limited to 'tests')
-rw-r--r--tests/cases/legalizer_ta2.ll18
-rw-r--r--tests/cases/legalizer_ta2.txt1
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/cases/legalizer_ta2.ll b/tests/cases/legalizer_ta2.ll
index 8500bcd4..bb7220c8 100644
--- a/tests/cases/legalizer_ta2.ll
+++ b/tests/cases/legalizer_ta2.ll
@@ -116,6 +116,24 @@ 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*))
+ store i104 %ored, i104* %bundled, align 4
+ %iff = zext i1 %if to i64
+ switch i64 %iff, label %a50 [
+ i64 1, label %a30
+ i64 0, label %a40
+ ]
+
+a50:
+ store i104 %xored, i104* %bundled, align 4
+ br label %a40
+
+a30:
+ store i104 %anded, i104* %bundled, align 4
+ br label %a40
+
+a40:
+ call i32 (i8*)* @puts(i8* %buffer)
+
; select
%chosen = select i1 %if, i104 %loaded, i104 -1
diff --git a/tests/cases/legalizer_ta2.txt b/tests/cases/legalizer_ta2.txt
index 4d46515b..93ea1e23 100644
--- a/tests/cases/legalizer_ta2.txt
+++ b/tests/cases/legalizer_ta2.txt
@@ -16,5 +16,6 @@ hello, war`d
hello, wor-d
hello, wor
hello, worl
+hello, war`d
hello, world
hello, w