mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-19 01:13:25 +00:00
43b40035ba
Fix syntax of tests to ensure grep pattern is properly quoted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36134 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
487 B
LLVM
25 lines
487 B
LLVM
; Simple sanity check testcase. Both alloca's should be eliminated.
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep alloca
|
|
|
|
implementation
|
|
|
|
double "testfunc"(int %i, double %j)
|
|
begin
|
|
%I = alloca int
|
|
%J = alloca double
|
|
|
|
store int %i, int* %I
|
|
store double %j, double* %J
|
|
|
|
%t1 = load int* %I
|
|
%t2 = add int %t1, 1
|
|
store int %t2, int* %I
|
|
|
|
%t3 = load int* %I
|
|
%t4 = cast int %t3 to double
|
|
%t5 = load double* %J
|
|
%t6 = mul double %t4, %t5
|
|
|
|
ret double %t6
|
|
end
|