gcc/ChangeLog:
* doc/sourcebuild.texi: Document LRA target selector.
gcc/testsuite/ChangeLog:
PR testsuite/99292
* lib/target-supports.exp (check_effective_target_lra): New.
* gcc.c-torture/compile/asmgoto-2.c: Use LRA target selector.
* gcc.c-torture/compile/asmgoto-5.c: Likewise.
* gcc.c-torture/compile/pr98096.c: Likewise.
* gcc.dg/pr97954.c: Likewise.
@item llvm_binutils
Target is using an LLVM assembler and/or linker, instead of GNU Binutils.
+@item lra
+Target supports local register allocator (LRA).
+
@item lto
Compiler has been configured to support link-time optimization (LTO).
/* This test should be switched off for a new target with less than 4 allocatable registers */
-/* { dg-do compile } */
-/* { dg-skip-if "Reload target" { hppa*-*-* } } */
+/* { dg-do compile { target lra } } */
int
foo (void)
{
/* Test to generate output reload in asm goto on x86_64. */
-/* { dg-do compile } */
+/* { dg-do compile { target lra } } */
/* { dg-skip-if "no O0" { { i?86-*-* x86_64-*-* } && { ! ia32 } } { "-O0" } { "" } } */
-/* { dg-skip-if "Reload target" { hppa*-*-* } } */
#if defined __x86_64__
#define ASM(s) asm (s)
/* Test for correct naming of label operands in asm goto in case of presence of
input/output operands. */
-/* { dg-do compile } */
+/* { dg-do compile { target lra } } */
int i, j;
int f(void) {
asm goto ("# %0 %2" : "+r" (i) ::: jmp);
/* PR rtl-optimization/97954 */
-/* { dg-do compile } */
+/* { dg-do compile { target lra } } */
/* { dg-options "-O2" } */
int
}
}]
}
+
+# return 1 if LRA is supported.
+
+proc check_effective_target_lra { } {
+ if { [istarget hppa*-*-*] } {
+ return 0
+ }
+ return 1
+}
+