aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/degen-function.c
blob: a7cff443c981369116002e1f79958141eb5aa56b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
extern int fun(int);

typedef int (*fun_t)(int);

fun_t fa(void) { return &fun; }
fun_t f0(void) { return  fun; }
fun_t f1(void) { return *fun; }

/*
 * check-name: degen-function
 * check-command: test-linearize -m64 -Wno-decl -fdump-ir=linearize $file
 *
 * check-output-start
fa:
.L0:
	<entry-point>
	symaddr.64  %r1 <- fun
	phisrc.64   %phi1(return) <- %r1
	br          .L1

.L1:
	phi.64      %r2 <- %phi1(return)
	ret.64      %r2


f0:
.L2:
	<entry-point>
	symaddr.64  %r3 <- fun
	phisrc.64   %phi2(return) <- %r3
	br          .L3

.L3:
	phi.64      %r4 <- %phi2(return)
	ret.64      %r4


f1:
.L4:
	<entry-point>
	symaddr.64  %r5 <- fun
	phisrc.64   %phi3(return) <- %r5
	br          .L5

.L5:
	phi.64      %r6 <- %phi3(return)
	ret.64      %r6


 * check-output-end
 */