diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-13 17:40:03 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-13 19:01:04 -0800 |
commit | b9d210628b059e51cecd6a212ee4f837dbb7bad3 (patch) | |
tree | 6725f5e39cfea05cae730f61112411e1bfdab305 | |
parent | c8974f172644d85a2dfb6adc494c8e760b2894a0 (diff) |
i96_ashr testcase
-rw-r--r-- | tests/cases/i96_ashr_ta2.ll | 35 | ||||
-rw-r--r-- | tests/cases/i96_ashr_ta2.txt | 3 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/cases/i96_ashr_ta2.ll b/tests/cases/i96_ashr_ta2.ll new file mode 100644 index 00000000..83966168 --- /dev/null +++ b/tests/cases/i96_ashr_ta2.ll @@ -0,0 +1,35 @@ +; ModuleID = 'tests/hello_world.bc' +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" + +@.str = private unnamed_addr constant [23 x i8] c"hello..world!%x,%x,%x\0A\00", align 1 + +; [#uses=0] +define i32 @main() { +entry: + %a = trunc i128 5634002668910802268259393791 to i96 + %x = trunc i96 %a to i32 + %y0 = lshr i96 %a, 32 + %y = trunc i96 %y0 to i32 + %z0 = lshr i96 %a, 64 + %z = trunc i96 %z0 to i32 + %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([23 x i8]* @.str, i32 0, i32 0), i32 %x, i32 %y, i32 %z) ; [#uses=0 type=i32] + %b = lshr i96 78981949996569583556032504063, 17 + %bx = trunc i96 %b to i32 + %by0 = lshr i96 %b, 32 + %by = trunc i96 %by0 to i32 + %bz0 = lshr i96 %b, 64 + %bz = trunc i96 %bz0 to i32 + %bcall = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([23 x i8]* @.str, i32 0, i32 0), i32 %bx, i32 %by, i32 %bz) ; [#uses=0 type=i32] + %c = ashr i96 78981949996569583556032504063, 17 + %cx = trunc i96 %c to i32 + %cy0 = lshr i96 %c, 32 + %cy = trunc i96 %cy0 to i32 + %cz0 = lshr i96 %c, 64 + %cz = trunc i96 %cz0 to i32 + %ccall = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([23 x i8]* @.str, i32 0, i32 0), i32 %cx, i32 %cy, i32 %cz) ; [#uses=0 type=i32] + ret i32 1 +} + +; [#uses=1] +declare i32 @printf(i8*, ...) diff --git a/tests/cases/i96_ashr_ta2.txt b/tests/cases/i96_ashr_ta2.txt new file mode 100644 index 00000000..dbbcf911 --- /dev/null +++ b/tests/cases/i96_ashr_ta2.txt @@ -0,0 +1,3 @@ +hello..world!2468a0ff,abcdefdc,12345678 +hello..world!f7ee1234,2b3c55e6,7f9a +hello..world!f7ee1234,2b3c55e6,ffffff9a |