aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-28 09:34:45 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-28 09:34:45 -0800
commitc17b30680c3a45dc3e190390c3f8676188d6ffee (patch)
tree0182c5c61d43f524d15202bcf22f3aec862a2842
parentbbab542ca777f91cae76244dc8455c800de58ce7 (diff)
improve legalizer test
-rw-r--r--tests/cases/legalizer_ta2.ll7
-rw-r--r--tests/cases/legalizer_ta2.txt1
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/cases/legalizer_ta2.ll b/tests/cases/legalizer_ta2.ll
index 2e27feac..7d7007ea 100644
--- a/tests/cases/legalizer_ta2.ll
+++ b/tests/cases/legalizer_ta2.ll
@@ -38,6 +38,13 @@ entry:
call i32 (i8*)* @puts(i8* %buffer)
; trunc
+ %shifted4 = shl i104 %loaded, 64
+ store i104 %shifted4, i104* %bundled, align 4
+ %nonzero64 = trunc i104 %loaded to i64 ; remove initial zeros
+ %bundled64 = bitcast i104* %bundled to i64*
+ store i64 %nonzero64, i64* %bundled64, align 4
+ call i32 (i8*)* @puts(i8* %buffer)
+
store i104 0, i104* %bundled, align 4 ; wipe it out
%small32 = trunc i104 %loaded to i32
%buffer32 = bitcast i8* %buffer to i32*
diff --git a/tests/cases/legalizer_ta2.txt b/tests/cases/legalizer_ta2.txt
index bfb1213c..845f9ae0 100644
--- a/tests/cases/legalizer_ta2.txt
+++ b/tests/cases/legalizer_ta2.txt
@@ -5,6 +5,7 @@ llo, world
o, world
hello, world
qhello, world
+hello, whello
hell
he
hello, w