summaryrefslogtreecommitdiff
path: root/tools/mir_opt_test/tests/sroa.rs
blob: 30a692215ae691b92f6b6be9184f3a7c2ef9ba4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//
// Tests for SROA-style optimisations
// - SROA = Scalar Reorganisation Of Aggregates - breaking composite types up into individual values
//

#[test="simple_exp"]
fn simple(a: i32, b: i32) -> i32
{
	let v: (i32, i32,);
	bb0: {
		ASSIGN v = (a, b);
		ASSIGN retval = ADD(v.0, v.1);
	} RETURN;
}
fn simple_exp(a: i32, b: i32) -> i32
{
	bb0: {
		ASSIGN retval = ADD(a, b);
	} RETURN;
}