The test failed on aarch64-none-elf, aarch64-none-linux-gnu, aarch64_be-none-elf, looks like because of: commit 38ef3642f7cce23012fc1126e292aa1a7285f849 Author: marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Mon Jul 31 11:16:00 2017 +0000 Recover GOTO predictor. 2017-07-31 Jan Hubicka <hubicka@ucw.cz> Martin Liska <mliska@suse.cz> * c-typeck.c (c_finish_goto_label): Build gimple predict stament. 2017-07-31 Jan Hubicka <hubicka@ucw.cz> Martin Liska <mliska@suse.cz> * predict.def: Remove old comment and adjust probability. * gimplify.c (should_warn_for_implicit_fallthrough): Ignore PREDICT statements. 2017-07-31 Jan Hubicka <hubicka@ucw.cz> Martin Liska <mliska@suse.cz> * gcc.dg/predict-15.c: New test. * gcc.dg/tree-ssa/vrp24.c: Update scanned pattern. 2017-07-31 Jan Hubicka <hubicka@ucw.cz> Martin Liska <mliska@suse.cz> * pt.c (tsubst_copy): Copy PREDICT_EXPR. * semantics.c (finish_goto_stmt): Build gimple predict stament. * constexpr.c (potential_constant_expression_1): Handle PREDICT_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250737 138bc75d-0d04-0410-961f-82ee72b054a4
Created attachment 41880 [details] Assembly before
Created attachment 41881 [details] Assembly after
Confirmed that /* { dg-final { scan-assembler "Ltb" } } */ is missing after the revision. Can you amker please tell me how the test works?
(In reply to Martin Liška from comment #3) > Confirmed that > /* { dg-final { scan-assembler "Ltb" } } */ > > is missing after the revision. Can you amker please tell me how the test > works? It's from auto testing, I will try to reproduce it and update here.
(In reply to Martin Liška from comment #3) > Confirmed that > /* { dg-final { scan-assembler "Ltb" } } */ > > is missing after the revision. Can you amker please tell me how the test > works? I don't know the details either. Looks like it tests correct code generation for long distance conditional jump. With the change, one type of long distance jump disappeared thus no relevant code is generated. I guess this requires a test case change. CCing AArch64 maintainer.
This is caused by adding the predict statement in finish_goto_label (c/c-typeck.c). I tried to modify the test case to generate an Ltb label again but could not do it. I put an abort in aarch64_gen_far_branch for anytime an Ltb label was generated but after doing a bootstrap and a full testsuite run never hit the abort. I tried writing a new testsuite from scratch but again, could not generate an Ltb label. I am thinking that maybe we should just remove the Ltb check from the test case.
> > I am thinking that maybe we should just remove the Ltb check from the test > case. Feel free to do it ;)
Fixed
Author: aldyh Date: Wed Sep 13 16:57:39 2017 New Revision: 252426 URL: https://gcc.gnu.org/viewcvs?rev=252426&root=gcc&view=rev Log: [AArch64] Fix longbranch test Fix longbranch test so it still generates long tbz branches. gcc/testsuite/ PR target/81643 * gcc.target/aarch64/long_branch_1.c: Improve testcase. Modified: branches/range-gen2/gcc/testsuite/ChangeLog branches/range-gen2/gcc/testsuite/gcc.target/aarch64/long_branch_1.c