Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/debug/debug-1.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Verify that the scheduler does not discard the lexical block. */ /* { dg-do compile } */ /* { dg-options "-dA" } */ /* On MIPS targets that support conditional moves, the optimal implementation of this function is: l[wd] tmp,p li $2,2 jr $31 movz $2,$0,tmp After if-conversion, we have a conditional move into a pseudo P followed a copy of P into the return register ($2). P is associated with xyzzy, so if-conversion is behaving as expected, and has not lost the variable association. The destination of the second instruction is associated with the function return value. Combine then combines these two instructions, removing the last use of P and xyzzy. Everything is behaving as expected in this scenario, so we avoid using conditional moves for this test. Similar for MMIX, with the payload insns being "LDO $0,p; ZSNZ $0,$0,2". */ /* { dg-options "-dA -fno-if-conversion" { target mips*-*-* mmix-knuth-mmixware } } */ /* { dg-final { scan-assembler "xyzzy" } } */ long p; long foo(void) { { long xyzzy = 0; if (p) xyzzy = 2; return xyzzy; } }