mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
Modernize testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5732 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -8,23 +8,20 @@
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
int "test1"(int %A)
|
int %test1(int %A) {
|
||||||
begin
|
|
||||||
%B = mul int %A, 1
|
%B = mul int %A, 1
|
||||||
ret int %B
|
ret int %B
|
||||||
end
|
}
|
||||||
|
|
||||||
int "test2"(int %A)
|
int %test2(int %A) {
|
||||||
begin
|
|
||||||
%B = mul int %A, 2 ; Should convert to an add instruction
|
%B = mul int %A, 2 ; Should convert to an add instruction
|
||||||
ret int %B
|
ret int %B
|
||||||
end
|
}
|
||||||
|
|
||||||
int "test3"(int %A)
|
int %test3(int %A) {
|
||||||
begin
|
|
||||||
%B = mul int %A, 0 ; This should disappear entirely
|
%B = mul int %A, 0 ; This should disappear entirely
|
||||||
ret int %B
|
ret int %B
|
||||||
end
|
}
|
||||||
|
|
||||||
double %test4(double %A) {
|
double %test4(double %A) {
|
||||||
%B = mul double 1.0, %A ; This is safe for FP
|
%B = mul double 1.0, %A ; This is safe for FP
|
||||||
|
Reference in New Issue
Block a user