From: Reid Spencer Date: Thu, 19 Aug 2004 19:11:57 +0000 (+0000) Subject: Add a test case test test 1.3 alignment removal and to test a regression X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b6e55b18b79b6a2cc75365ecd3478e5d5158806;p=oota-llvm.git Add a test case test test 1.3 alignment removal and to test a regression on disassembly speed (where SlotMachine was being recomputed on each getSlot() call). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15920 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Bytecode/slow.bc-13 b/test/Bytecode/slow.bc-13 new file mode 100644 index 00000000000..6f1e62b99d9 Binary files /dev/null and b/test/Bytecode/slow.bc-13 differ diff --git a/test/Bytecode/slow.ll b/test/Bytecode/slow.ll new file mode 100644 index 00000000000..5d0777cd131 --- /dev/null +++ b/test/Bytecode/slow.ll @@ -0,0 +1,21089 @@ +; This bytecode test pounds on instruction alignment and showed +; up a bug in llvm-dis performance + +; RUN: llvm-as < %s -o - | llvm-dis -o %t1 +; RUN: llvm-dis < %s.bc-13 -o - %t2 +; RUN: diff %t1 %t2 + +implementation ; Functions: + +declare int %getchar() + +declare int %putchar(int) + +ubyte %inputcell() { +entry: + call int %getchar( ) ; :0 [#uses=2] + seteq int %0, -1 ; :0 [#uses=1] + br bool %0, label %eof, label %ok + +ok: ; preds = %entry + cast int %0 to ubyte ; :0 [#uses=1] + ret ubyte %0 + +eof: ; preds = %entry + ret ubyte 0 +} + +void %outputcell(ubyte) { +entry: + cast ubyte %0 to int ; :0 [#uses=1] + call int %putchar( int %0 ) ; :1 [#uses=0] + ret void +} + +int %main() { +entry: + %bfarray = malloc [262144 x ubyte] ; <[262144 x ubyte]*> [#uses=3366] + %bfarray.sub = getelementptr [262144 x ubyte]* %bfarray, int 0, int 0 ; [#uses=1] + getelementptr [262144 x ubyte]* %bfarray, int 0, int 3 ; :0 [#uses=2] + load ubyte* %0 ; :0 [#uses=1] + add ubyte %0, 1 ; :1 [#uses=1] + store ubyte %1, ubyte* %0 + getelementptr [262144 x ubyte]* %bfarray, int 0, int 6 ; :1 [#uses=2] + load ubyte* %1 ; :2 [#uses=2] + add ubyte %2, 2 ; :3 [#uses=1] + store ubyte %3, ubyte* %1 + seteq ubyte %2, 254 ; :0 [#uses=1] + br bool %0, label %1, label %0 + +;