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 + +;