Hi! On 2024-02-16T10:48:53-0800, Mike Stump wrote: > On Feb 16, 2024, at 2:16 AM, Jakub Jelinek wrote: >> >> There is one special case, NVPTX, which is a TARGET_NO_REGISTER_ALLOCATION >> target. I think claiming for it that it is a lra target is strange (even >> though it effectively returns true for targetm.lra_p ()), unsure if it >> supports asm goto with outputs or not, if it does and we want to test it, >> perhaps we should introduce asm_goto_outputs effective target and use >> lra || nvptx-*-* for that? > > Since the port people have to maintain that code in general, I usually leave it to them to try and select a cheap, maintainable way to manage it. > > If people want to pave the way, I'd tend to defer to them, having thought about more than I. Here I am. ;-) After commit e16f90be2dc8af6c371fe79044c3e668fa3dda62 "testsuite: Fix up lra effective target", we get for nvptx target: -PASS: gcc.c-torture/compile/asmgoto-2.c -O0 (test for excess errors) +ERROR: gcc.c-torture/compile/asmgoto-2.c -O0 : no files matched glob pattern "lra1020113.c.[0-9][0-9][0-9]r.reload" for " dg-do 2 compile { target lra } " Etc. That is, the current effective-target 'lra' is not suitable for nvptx -- which, I suppose, is OK, given that nvptx neither uses LRA nor doesn't use LRA. ;-) (Therefore, effective-target 'lra' shouldn't get used in test cases that are active for nvptx.) However, nvptx appears to support 'asm goto' with outputs, including the new execution test case: PASS: gcc.dg/pr107385.c execution test I'm attaching "[WIP] New effective-target 'asm_goto_with_outputs'", which does address the effective-target check for nvptx, and otherwise does 's%lra%asm_goto_with_outputs'. (I have not yet actually merged 'check_effective_target_lra' into 'check_effective_target_asm_goto_with_outputs'.) I have verified that all current effective-target 'lra' test cases actually use 'asm goto' with outputs, there is just one exception: 'gcc.dg/pr110079.c' (see "bb-reorder: Fix -freorder-blocks-and-partition ICEs on aarch64 with asm goto [PR110079]", "ICE with -freorder-blocks-and-partition and inline-asm goto"). That test case, 'gcc.dg/pr110079.c', currently uses 'target lra', and uses 'asm goto' -- but not with outputs, so is 'asm_goto_with_outputs' not really applicable? The test case does PASS for nvptx target (but I've not verified what it's actually doing/testing). How to handle that one? Grüße Thomas