aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/degen-function.c
blob: 6dd3123b8b5e8a1193559347870c9505f6f739b5 (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
extern int fun(int);

typedef int (*fun_t)(int);

fun_t fa(void) { return &fun; }
fun_t f0(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      %r1


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

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


 * check-output-end
 */