enable sqrt insns for cdce3.c
Hans-Peter Nilsson
hp@bitrange.com
Wed Mar 10 17:11:34 GMT 2021
On Wed, 10 Mar 2021, Alexandre Oliva wrote:
>
> The test expects shrink-wrapping of the fsqrt call, but that will only
> occur when there is a usable sqrt insn.
>
> Arrange for dejagnu to add the options that enable the sqrt insn, if
> one is available, and to skip the test otherwise.
>
>
> H-P, this *should* obviate the mmix-specific dg-skip-if.
Unfortunately it doesn't.
> Would it be
> easy for you to confirm that this is the case and, if so, drop it?
About as easy as for anyone (this is a compile-test), but no
problem. Unfortunately I get, with your patch applied and the
dg-skip-if removed:
FAIL: gcc.dg/cdce3.c scan-tree-dump cdce "cdce3.c:12: [^\n\r]*
function call is shrink-wrapped into error conditions."
The dump files and assembly file show no obvious clues to me as
to what is supposed to happen; attached.
brgds, H-P
-------------- next part --------------
;; Function foo (foo, funcdef_no=0, decl_uid=1421, cgraph_uid=1, symbol_order=0)
float foo (float x)
{
float _4;
<bb 2> [local count: 1073741824]:
_4 = sqrtf (x_2(D));
return _4;
}
-------------- next part --------------
;; Function foo (foo, funcdef_no=0, decl_uid=1421, cgraph_uid=1, symbol_order=0)
float foo (float x)
{
float _4;
<bb 2> [local count: 1073741824]:
_4 = sqrtf (x_2(D)); [tail call]
return _4;
}
-------------- next part --------------
# 1 "cdce3.c"
! mmixal:= 8H LOC Data_Section
.text ! mmixal:= 9H LOC 8B
.p2align 2
LOC @+(4-@)&3
.global foo
foo IS @
GET $1,rJ
SET $3,$0
PUSHJ $2,sqrtf
PUT rJ,$1
SET $0,$2
POP 1,0
.ident "GCC: (GNU) 11.0.1 20210309 (experimental) [master revision 0455cd76b687:0ed66571b1d9:63d74fed4566f1de583c368ecb9e2fc423fb1c87]"
.data ! mmixal:= 8H LOC 9B
More information about the Gcc-patches
mailing list