1 /* Test load on condition patterns. */
2
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -march=z13 -mzarch" } */
5
loc_r(unsigned long rc,unsigned long cond,unsigned long val)6 unsigned long loc_r (unsigned long rc, unsigned long cond, unsigned long val)
7 {
8 if (cond)
9 rc = val;
10 return rc;
11 }
12 /* { dg-final { scan-assembler "\tlocgrne\t%r2,%r4" { target { lp64 } } } } */
13 /* { dg-final { scan-assembler "\tlocrne\t%r2,%r4" { target { ! lp64 } } } } */
14
loc_hi(long rc,long cond)15 long loc_hi (long rc, long cond)
16 {
17 if (cond)
18 rc = (long)-1;
19 return rc;
20 }
21 /* { dg-final { scan-assembler "\tlocghine\t%r2,-1" { target { lp64 } } } } */
22 /* { dg-final { scan-assembler "\tlochine\t%r2,-1" { target { ! lp64 } } } } */
23