Bug 59308 - [4.9 Regression] gcc.dg/tree-ssa/ssa-ifcombine-ccmp-[1456] tests fail on arm cortex-a5
Summary: [4.9 Regression] gcc.dg/tree-ssa/ssa-ifcombine-ccmp-[1456] tests fail on arm ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.9.0
: P2 normal
Target Milestone: 4.9.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-27 08:28 UTC by christophe.lyon
Modified: 2014-03-12 14:02 UTC (History)
3 users (show)

See Also:
Host:
Target: arm
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-11-27 00:00:00


Attachments
gcc49-pr59308.patch (1.10 KB, patch)
2014-03-04 11:23 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description christophe.lyon 2013-11-27 08:28:45 UTC
Commit 204194 from Andrew Pinski introduced several new tests, among which

  gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c scan-tree-dump optimized "&"
  gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c scan-tree-dump optimized "&"
  gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c scan-tree-dump-times optimized "&" 2
  gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c scan-tree-dump-times optimized "\\|" 2

fail when configuring --target arm-none-linux-gnueabihf --with-cpu=cortex-a5 --with-fpu=vfpv3-d16-fp16.
Comment 1 Richard Biener 2013-11-27 08:55:51 UTC
They depend on BRANCH_COST, their target selector needs updating for arm.

/* { dg-do compile { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* arc*-*-*"} } } */

or rather we should have a effective-target logical_op_non_short_circuit
Comment 2 Jakub Jelinek 2014-02-18 07:14:52 UTC
So, now that r207810 has been committed, shouldn't these tests be updated too?
Comment 3 Richard Biener 2014-02-27 09:23:07 UTC
Yes.
Comment 4 Richard Earnshaw 2014-03-03 07:40:28 UTC
It's not as simple as updating the target selector.  LONSC_P depends on BRANCH_COST, which can vary depending on the specific micro-architecture for the target system.
Comment 5 Jakub Jelinek 2014-03-03 07:47:48 UTC
So the test can then be improved for ARM by testing GCC predefined macros or something similar, to make check_effective_target_logical_op_short_circuit
more precise.  Are you sure check_effective_target_arm_cortex_m isn't good enough for ARM?
Comment 6 Jakub Jelinek 2014-03-04 11:19:50 UTC
Don't see why this should be P1, it is testsuite only thing.
Comment 7 Jakub Jelinek 2014-03-04 11:23:01 UTC
Created attachment 32258 [details]
gcc49-pr59308.patch

Patch (only tested on x86_64-linux with --target_board=unix\{-m32,-m32/-march=i386,-m64\} where some of those tests previously also failed with -march=i386 variant).

Though, I wonder if it wouldn't be better to just compile or run those tests just on targets which do support -mbranch-cost=2 option (mips/avr/s390/i?86/x86_64) and ignore all other targets.  The tests are testing GIMPLE behavior anyway.
Comment 8 Jakub Jelinek 2014-03-05 20:08:22 UTC
Author: jakub
Date: Wed Mar  5 20:07:50 2014
New Revision: 208354

URL: http://gcc.gnu.org/viewcvs?rev=208354&root=gcc&view=rev
Log:
	PR testsuite/59308
	* gcc.dg/pr46309.c: Don't compile on logical_op_short_circuit targets
	other than mips/avr.  Use -mbranch-cost=2 even for i?86/x86_64.
	* gcc.dg/tree-ssa/reassoc-32.c: Use -mbranch-cost=2 even for
	s390*/i?86/x86_64.
	* gcc.dg/tree-ssa/reassoc-33.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-34.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-35.c: Likewise.
	* gcc.dg/tree-ssa/reassoc-36.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: Don't compile on
	logical_op_short_circuit targets other than avr.  Use -mbranch-cost=2
	even for mips*/s390*/i?86/x86_64.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: Likewise.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr46309.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-32.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c
Comment 9 Jakub Jelinek 2014-03-12 14:02:34 UTC
Assuming this is fixed, please reopen if not with details where it fails and what.