mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
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
This commit is contained in:
parent
6dcceb5ecb
commit
b8a5d63b18
11
test/CodeGen/Alpha/bic.ll
Normal file
11
test/CodeGen/Alpha/bic.ll
Normal file
@ -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 ; <long> [#uses=1]
|
||||
%tmp.2 = and long %y, long %tmp.1
|
||||
ret long %tmp.2
|
||||
}
|
11
test/CodeGen/Alpha/eqv.ll
Normal file
11
test/CodeGen/Alpha/eqv.ll
Normal file
@ -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 ; <long> [#uses=1]
|
||||
%tmp.2 = xor long %y, long %tmp.1
|
||||
ret long %tmp.2
|
||||
}
|
9
test/CodeGen/Alpha/neg1.ll
Normal file
9
test/CodeGen/Alpha/neg1.ll
Normal file
@ -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
|
||||
}
|
10
test/CodeGen/Alpha/not.ll
Normal file
10
test/CodeGen/Alpha/not.ll
Normal file
@ -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 ; <long> [#uses=1]
|
||||
ret long %tmp.1
|
||||
}
|
11
test/CodeGen/Alpha/ornot.ll
Normal file
11
test/CodeGen/Alpha/ornot.ll
Normal file
@ -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 ; <long> [#uses=1]
|
||||
%tmp.2 = or long %y, long %tmp.1
|
||||
ret long %tmp.2
|
||||
}
|
Loading…
Reference in New Issue
Block a user