diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-07-10 21:54:05 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-07-10 21:54:05 +0000 |
commit | a7a1c7e9719a4358521035be9965603eb1f429a6 (patch) | |
tree | 2e633b416dd031f4a24eb869c9eedc39a4f61708 /test/LLC/fwdtwice.ll | |
parent | 975f6d4f4477a68f9b322843a1bf2ebc24214b3a (diff) | |
download | external_llvm-a7a1c7e9719a4358521035be9965603eb1f429a6.zip external_llvm-a7a1c7e9719a4358521035be9965603eb1f429a6.tar.gz external_llvm-a7a1c7e9719a4358521035be9965603eb1f429a6.tar.bz2 |
Some of these are feature tests, not regression tests.
This directory needs to be reorganized and some of the tests
need changes to make them executable. Also comments would help...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LLC/fwdtwice.ll')
-rw-r--r-- | test/LLC/fwdtwice.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/LLC/fwdtwice.ll b/test/LLC/fwdtwice.ll new file mode 100644 index 0000000..44c7258 --- /dev/null +++ b/test/LLC/fwdtwice.ll @@ -0,0 +1,33 @@ +;; +;; Test the sequence: +;; cast -> setle 0, %cast -> br %cond +;; This sequence should cause the cast value to be forwarded twice, +;; i.e., cast is forwarded to the setle and teh setle is forwarded +;; to the branch. +;; register argument of the "branch-on-register" instruction, i.e., +;; +;; This produces the bogus output instruction: +;; brlez <NULL VALUE>, .L_SumArray_bb3. +;; This came from %bb1 of sumarrray.ll generated from sumarray.c. + + +;;;; ****************************************************** +implementation +;;;; ****************************************************** + +int "SumArray"(int %Num) +begin +bb0: ;[#uses=3] + br label %Top +Top: + %Num = alloca int ; <int *> [#uses=2] + store int %Num, int * %Num + %reg108 = load int * %Num ; <int> [#uses=2] + %cast1006 = cast int %reg108 to uint ; <uint> [#uses=1] + %cond1001 = setle uint %cast1006, 0 ; <bool> [#uses=1] + br bool %cond1001, label %bb6, label %Top + +bb6: + ret int 42 +end + |