From b8a5d63b187b411e8bc9703233ee42d6ccd05f6c Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Fri, 8 Apr 2005 16:46:44 +0000 Subject: [PATCH] added some tests to check stupid pattern matching mistakes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21154 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Alpha/bic.ll | 11 +++++++++++ test/CodeGen/Alpha/eqv.ll | 11 +++++++++++ test/CodeGen/Alpha/neg1.ll | 9 +++++++++ test/CodeGen/Alpha/not.ll | 10 ++++++++++ test/CodeGen/Alpha/ornot.ll | 11 +++++++++++ 5 files changed, 52 insertions(+) create mode 100644 test/CodeGen/Alpha/bic.ll create mode 100644 test/CodeGen/Alpha/eqv.ll create mode 100644 test/CodeGen/Alpha/neg1.ll create mode 100644 test/CodeGen/Alpha/not.ll create mode 100644 test/CodeGen/Alpha/ornot.ll diff --git a/test/CodeGen/Alpha/bic.ll b/test/CodeGen/Alpha/bic.ll new file mode 100644 index 00000000000..581fc61c689 --- /dev/null +++ b/test/CodeGen/Alpha/bic.ll @@ -0,0 +1,11 @@ +; Make sure this testcase codegens to the bic instruction +; RUN: llvm-as < %s | llc -march=alpha | grep 'bic' + +implementation ; Functions: + +long %bar(long %x, long %y) { +entry: + %tmp.1 = xor long %x, -1 ; [#uses=1] + %tmp.2 = and long %y, long %tmp.1 + ret long %tmp.2 +} diff --git a/test/CodeGen/Alpha/eqv.ll b/test/CodeGen/Alpha/eqv.ll new file mode 100644 index 00000000000..1cc397e640c --- /dev/null +++ b/test/CodeGen/Alpha/eqv.ll @@ -0,0 +1,11 @@ +; Make sure this testcase codegens to the eqv instruction +; RUN: llvm-as < %s | llc -march=alpha | grep 'eqv' + +implementation ; Functions: + +long %bar(long %x, long %y) { +entry: + %tmp.1 = xor long %x, -1 ; [#uses=1] + %tmp.2 = xor long %y, long %tmp.1 + ret long %tmp.2 +} diff --git a/test/CodeGen/Alpha/neg1.ll b/test/CodeGen/Alpha/neg1.ll new file mode 100644 index 00000000000..5d6ccd0da5a --- /dev/null +++ b/test/CodeGen/Alpha/neg1.ll @@ -0,0 +1,9 @@ +; Make sure this testcase codegens to the lda -1 instruction +; RUN: llvm-as < %s | llc -march=alpha | grep '-1' + +implementation ; Functions: + +long %bar() { +entry: + ret long -1 +} diff --git a/test/CodeGen/Alpha/not.ll b/test/CodeGen/Alpha/not.ll new file mode 100644 index 00000000000..bf00ce3966f --- /dev/null +++ b/test/CodeGen/Alpha/not.ll @@ -0,0 +1,10 @@ +; Make sure this testcase codegens to the ornot instruction +; RUN: llvm-as < %s | llc -march=alpha | grep 'ornot' + +implementation ; Functions: + +long %bar(long %x) { +entry: + %tmp.1 = xor long %x, -1 ; [#uses=1] + ret long %tmp.1 +} diff --git a/test/CodeGen/Alpha/ornot.ll b/test/CodeGen/Alpha/ornot.ll new file mode 100644 index 00000000000..c92c3d5a18d --- /dev/null +++ b/test/CodeGen/Alpha/ornot.ll @@ -0,0 +1,11 @@ +; Make sure this testcase codegens to the ornot instruction +; RUN: llvm-as < %s | llc -march=alpha | grep 'ornot' + +implementation ; Functions: + +long %bar(long %x, long %y) { +entry: + %tmp.1 = xor long %x, -1 ; [#uses=1] + %tmp.2 = or long %y, long %tmp.1 + ret long %tmp.2 +} -- 2.34.1