aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-27 09:04:58 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-27 09:04:58 -0800
commitf5601d0f69dda3fca34beb84537d52f6b8d0e927 (patch)
tree80d25d82921822a4c81e50809d352e515ebdcc15
parent71cccfcf7980c134fee5aa019883b3da0e76cccf (diff)
improve legalizer test
-rw-r--r--tests/cases/legalizer_ta2.ll13
-rw-r--r--tests/cases/legalizer_ta2.txt2
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/cases/legalizer_ta2.ll b/tests/cases/legalizer_ta2.ll
index 1249c7eb..8500bcd4 100644
--- a/tests/cases/legalizer_ta2.ll
+++ b/tests/cases/legalizer_ta2.ll
@@ -116,6 +116,19 @@ 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*))
+; select
+
+ %chosen = select i1 %if, i104 %loaded, i104 -1
+ store i104 %chosen, i104* %bundled, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
+ store i104 0, i104* bitcast ([300 x i8]* @globaliz to i104*), align 4 ; wipe it out
+ %s64a = trunc i104 %loaded to i64
+ %s64b = trunc i104 %ander to i64
+ %s64 = select i1 %if, i64 %s64a, i64 -1
+ store i64 %s64, i64* bitcast ([300 x i8]* @globaliz to i64*), align 4
+ call i32 (i8*)* @puts(i8* bitcast ([300 x i8]* @globaliz to i8*))
+
ret i32 1
}
diff --git a/tests/cases/legalizer_ta2.txt b/tests/cases/legalizer_ta2.txt
index e25076e6..4d46515b 100644
--- a/tests/cases/legalizer_ta2.txt
+++ b/tests/cases/legalizer_ta2.txt
@@ -16,3 +16,5 @@ hello, war`d
hello, wor-d
hello, wor
hello, worl
+hello, world
+hello, w