It seems to be working but I need to ckeck again
This commit is contained in:
26
tests/sprint3/test/sp3_if_else_sse.alpha
Normal file
26
tests/sprint3/test/sp3_if_else_sse.alpha
Normal file
@ -0,0 +1,26 @@
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
||||
type main: string -> integer
|
||||
function entry: main
|
||||
function bar: T2
|
||||
|
||||
bar (r,s) := {
|
||||
return 0;
|
||||
}
|
||||
|
||||
entry (arg) := {
|
||||
[ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
|
||||
if ( !( x < y ) & ( z & t ) ) then {
|
||||
(* if ( result < w.y ) then {
|
||||
result := 8;
|
||||
} else {
|
||||
result := 9;
|
||||
} *)
|
||||
z := t;
|
||||
} else {
|
||||
y := true; (* bar('c', 7); *)
|
||||
}
|
||||
return 0;
|
||||
}
|
29
tests/sprint3/test/sp3_if_else_sse2.alpha
Normal file
29
tests/sprint3/test/sp3_if_else_sse2.alpha
Normal file
@ -0,0 +1,29 @@
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
||||
type main: string -> integer
|
||||
function entry: main
|
||||
function bar: T2
|
||||
|
||||
bar (r,s) := {
|
||||
return 0;
|
||||
}
|
||||
|
||||
entry (arg) := {
|
||||
[ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
|
||||
if ( y & z | t ) then {
|
||||
(* if ( ( x < y ) & ( z = t ) ) then {
|
||||
y := z < t;
|
||||
t:= 0;
|
||||
} else {
|
||||
t := z = t;
|
||||
z := 1;
|
||||
} *)
|
||||
t := true;
|
||||
} else {
|
||||
y := true; (* bar('c', 7); *)
|
||||
}
|
||||
(* x := x & y; *)
|
||||
return 0;
|
||||
}
|
27
tests/sprint3/test/sp3_while_sse.alpha
Normal file
27
tests/sprint3/test/sp3_while_sse.alpha
Normal file
@ -0,0 +1,27 @@
|
||||
type rec: [character: x; integer: y]
|
||||
|
||||
type T2: rec -> integer
|
||||
|
||||
type main: string -> integer
|
||||
function entry: main
|
||||
function bar: T2
|
||||
|
||||
bar (r,s) := {
|
||||
return 0;
|
||||
}
|
||||
|
||||
entry (arg) := {
|
||||
[ Boolean:x ; Boolean:y ; Boolean:z ; Boolean:t]
|
||||
while ( !( x & y ) (* | ( z | t ) *) ) {
|
||||
(*
|
||||
if ( ( x < y ) & ( z = t ) ) then {
|
||||
y := z < t;
|
||||
} else {
|
||||
t := z = t;
|
||||
}
|
||||
*)
|
||||
y := true; (* bar('c', 7); *)
|
||||
}
|
||||
(* x := x & y; *)
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user