OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [debug/] [debug-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Verify that the scheduler does not discard the lexical block.  */
2
/* { dg-do compile } */
3
/* { dg-options "-dA" } */
4
/* On MIPS targets that support conditional moves, the optimal
5
   implementation of this function is:
6
 
7
        l[wd] tmp,p
8
        li $2,2
9
        jr $31
10
        movz $2,$0,tmp
11
 
12
   After if-conversion, we have a conditional move into a pseudo P
13
   followed a copy of P into the return register ($2).  P is associated
14
   with xyzzy, so if-conversion is behaving as expected, and has not lost
15
   the variable association.  The destination of the second instruction
16
   is associated with the function return value.  Combine then combines
17
   these two instructions, removing the last use of P and xyzzy.
18
 
19
   Everything is behaving as expected in this scenario, so we avoid
20
   using conditional moves for this test.  */
21
/* { dg-options "-dA -fno-if-conversion" { target mips*-*-* } } */
22
/* { dg-final { scan-assembler "xyzzy" } } */
23
 
24
long p;
25
 
26
long foo(void)
27
{
28
  {
29
    long xyzzy = 0;
30
    if (p)
31
      xyzzy = 2;
32
    return xyzzy;
33
  }
34
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.