| 1 |
// { dg-do run { target aarch64*-*-* } } |
| 2 |
// { dg-options "-O2" } |
| 3 |
|
| 4 |
struct data { |
| 5 |
double x; |
| 6 |
double y; |
| 7 |
long long cond; |
| 8 |
double res; |
| 9 |
}; |
| 10 |
|
| 11 |
void __RTL (startwith ("early_ra")) foo (struct data *ptr) |
| 12 |
{ |
| 13 |
(function "foo" |
| 14 |
(param "ptr" |
| 15 |
(DECL_RTL (reg/v:DI <0> [ ptr ])) |
| 16 |
(DECL_RTL_INCOMING (reg/v:DI x0 [ ptr ])) |
| 17 |
) ;; param "ptr" |
| 18 |
(insn-chain |
| 19 |
(block 2 |
| 20 |
(edge-from entry (flags "FALLTHRU")) |
| 21 |
(cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK) |
| 22 |
(insn 4 (set (reg:DI <0>) (reg:DI x0))) |
| 23 |
(insn 5 (set (reg:DF <1>) (mem:DF (reg:DI <0>) [1 S8 A8]))) |
| 24 |
(insn 6 (set (reg:DF <2>) (mem:DF (plus:DI (reg:DI <0>) |
| 25 |
(const_int 8)) [1 S8 A8]))) |
| 26 |
(insn 7 (set (reg:DI <3>) (mem:DI (plus:DI (reg:DI <0>) |
| 27 |
(const_int 16)) [1 S8 A8]))) |
| 28 |
(insn 8 (set (reg:CC cc) (compare:CC (reg:DI <3>) (const_int 0)))) |
| 29 |
(insn 9 (set (reg:DF <4>) (reg:DF <2>))) |
| 30 |
(insn 10 (set (reg:DF <5>) (plus:DF (reg:DF <1>) (reg:DF <2>)))) |
| 31 |
(insn 11 (set (reg:DF <2>) (if_then_else:DF |
| 32 |
(ge (reg:CC cc) (const_int 0)) |
| 33 |
(reg:DF <4>) |
| 34 |
(reg:DF <5>)))) |
| 35 |
(insn 12 (set (mem:DF (plus:DI (reg:DI <0>) |
| 36 |
(const_int 24)) [1 S8 A8]) |
| 37 |
(reg:DF <2>))) |
| 38 |
(edge-to exit (flags "FALLTHRU")) |
| 39 |
) ;; block 2 |
| 40 |
) ;; insn-chain |
| 41 |
) ;; function |
| 42 |
} |
| 43 |
|
| 44 |
int |
| 45 |
main (void) |
| 46 |
{ |
| 47 |
struct data d1 = { 1, 2, -1, 0 }; |
| 48 |
struct data d2 = { 3, 4, 1, 0 }; |
| 49 |
foo (&d1); |
| 50 |
foo (&d2); |
| 51 |
if (d1.res != 3 || d2.res != 4) |
| 52 |
__builtin_abort (); |
| 53 |
} |