* [PATCH][testsuite] Fix PR91419
@ 2019-08-13 7:51 Richard Biener
2019-08-13 12:59 ` Hans-Peter Nilsson
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2019-08-13 7:51 UTC (permalink / raw)
To: gcc-patches; +Cc: hp, law
The following fixes the observed regressions for targets not
naturally aligning 'int'. I've figured we have natural_alignment_32
whose incomplete target list I amended by looking for BIGGEST_ALIGNMENT
less than 32 (and for m68k-*-linux* asking the maintainer).
Tested on x86_64-unknown-linux-gnu.
OK?
The effective target is probably not too useful since it talks
about object sizes while usually alignmend of specific types
is to be constrained, but well...
Thanks,
Richard.
2019-08-13 Richard Biener <rguenther@suse.de>
PR testsuite/91419
* lib/target-supports.exp (natural_alignment_32): Amend target
list based on BIGGEST_ALIGNMENT.
(natural_alignment_64): Targets not natural_alignment_32 cannot
be natural_alignment_64.
* gcc.dg/tree-ssa/pr91091-2.c: XFAIL for !natural_alignment_32.
* gcc.dg/tree-ssa/ssa-fre-77.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-61.c: Require natural_alignment_32.
Index: gcc/testsuite/gcc.dg/tree-ssa/pr91091-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr91091-2.c (revision 274328)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr91091-2.c (working copy)
@@ -11,5 +11,5 @@ void swap(struct s* p, struct t* q)
}
/* The second statement is redundant. */
-/* { dg-final { scan-tree-dump-times "x = " 1 "fre1" } } */
-/* { dg-final { scan-tree-dump-times " = \[^;\]*x;" 1 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "x = " 1 "fre1" { xfail { ! natural_alignment_32 } } } } */
+/* { dg-final { scan-tree-dump-times " = \[^;\]*x;" 1 "fre1" { xfail { ! natural_alignment_32 } } } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-61.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-61.c (revision 274328)
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-61.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do link } */
+/* { dg-do link { target natural_alignment_32 } } */
/* { dg-options "-O -fdump-tree-fre1-details" } */
void link_error (void);
Index: gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-77.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-77.c (revision 274328)
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-77.c (working copy)
@@ -10,4 +10,4 @@ int foo (int *p, int *q)
return *p;
}
-/* { dg-final { scan-tree-dump "return 1;" "fre1" } } */
+/* { dg-final { scan-tree-dump "return 1;" "fre1" { xfail { ! natural_alignment_32 } } } } */
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 274328)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -6294,9 +6294,18 @@ proc check_effective_target_vect_aligned
proc check_effective_target_natural_alignment_32 { } {
# FIXME: 32bit powerpc: guaranteed only if MASK_ALIGN_NATURAL/POWER.
+ # FIXME: m68k has -malign-int
return [check_cached_effective_target_indexed natural_alignment_32 {
if { ([istarget *-*-darwin*] && [is-effective-target lp64])
- || [istarget avr-*-*] } {
+ || [istarget avr-*-*]
+ || [istarget m68k-*-linux*]
+ || [istarget pru-*-*]
+ || [istarget stormy16-*-*]
+ || [istarget rl78-*-*]
+ || [istarget pdp11-*-*]
+ || [istarget msp430-*-*]
+ || [istarget m32c-*-*]
+ || [istarget cris-*-*] } {
return 0
} else {
return 1
@@ -6311,8 +6320,9 @@ proc check_effective_target_natural_alig
proc check_effective_target_natural_alignment_64 { } {
return [check_cached_effective_target_indexed natural_alignment_64 {
- expr { ([is-effective-target lp64] && ![istarget *-*-darwin*])
- || [istarget spu-*-*] }
+ expr { [is-effective-target natural_alignment_32]
+ && (([is-effective-target lp64] && ![istarget *-*-darwin*])
+ || [istarget spu-*-*]) }
}]
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][testsuite] Fix PR91419
2019-08-13 7:51 [PATCH][testsuite] Fix PR91419 Richard Biener
@ 2019-08-13 12:59 ` Hans-Peter Nilsson
2019-08-14 9:53 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Hans-Peter Nilsson @ 2019-08-13 12:59 UTC (permalink / raw)
To: rguenther; +Cc: gcc-patches, law
> From: Richard Biener <rguenther@suse.de>
> Date: Tue, 13 Aug 2019 09:50:34 +0200
> 2019-08-13 Richard Biener <rguenther@suse.de>
>
> PR testsuite/91419
> * lib/target-supports.exp (natural_alignment_32): Amend target
> list based on BIGGEST_ALIGNMENT.
> (natural_alignment_64): Targets not natural_alignment_32 cannot
> be natural_alignment_64.
> * gcc.dg/tree-ssa/pr91091-2.c: XFAIL for !natural_alignment_32.
> * gcc.dg/tree-ssa/ssa-fre-77.c: Likewise.
> * gcc.dg/tree-ssa/ssa-fre-61.c: Require natural_alignment_32.
LGTM, thanks. (Not tested myself but my cris-elf autotester will pick it up.)
brgds, H-p
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][testsuite] Fix PR91419
2019-08-13 12:59 ` Hans-Peter Nilsson
@ 2019-08-14 9:53 ` Richard Biener
0 siblings, 0 replies; 3+ messages in thread
From: Richard Biener @ 2019-08-14 9:53 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: gcc-patches, law
On Tue, 13 Aug 2019, Hans-Peter Nilsson wrote:
> > From: Richard Biener <rguenther@suse.de>
> > Date: Tue, 13 Aug 2019 09:50:34 +0200
>
> > 2019-08-13 Richard Biener <rguenther@suse.de>
> >
> > PR testsuite/91419
> > * lib/target-supports.exp (natural_alignment_32): Amend target
> > list based on BIGGEST_ALIGNMENT.
> > (natural_alignment_64): Targets not natural_alignment_32 cannot
> > be natural_alignment_64.
> > * gcc.dg/tree-ssa/pr91091-2.c: XFAIL for !natural_alignment_32.
> > * gcc.dg/tree-ssa/ssa-fre-77.c: Likewise.
> > * gcc.dg/tree-ssa/ssa-fre-61.c: Require natural_alignment_32.
>
> LGTM, thanks. (Not tested myself but my cris-elf autotester will pick it up.)
Committed.
Thanks,
Richard.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-14 9:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 7:51 [PATCH][testsuite] Fix PR91419 Richard Biener
2019-08-13 12:59 ` Hans-Peter Nilsson
2019-08-14 9:53 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).