Successfully identified regression in *gcc* in CI configuration tcwg_gnu/gnu-master-arm-check_bootstrap. So far, this commit has regressed CI configurations: - tcwg_gnu/gnu-master-arm-check_bootstrap
Culprit: <cut> commit 7d8211603a3d04384812b481b0ae01205a287a72 Author: Richard Biener rguenther@suse.de Date: Wed Jun 30 16:28:50 2021 +0200
tree-optimization/101178 - handle VEC_PERM in SLP permute propagation
This adds handling of VEC_PERM nodes to SLP permute propagation. Previously VEC_PERM acted as forced materialization of incoming permutes since it is a good place to do that (with the constraint of those only appearing for two-operator nodes). The following patch, in addition to supporting (but not forcing) this, enables VEC_PERM nodes acting as "any" permute on the outgoing side since they also can consume arbitrary permutes on that side.
This again (meh) changes how we represent permutes and materialization on the graph vertices now explicitely having the common incoming permute as well as an outgoing permute and in case both are different the vertex acts as materialization point of the incoming permute.
2021-06-30 Richard Biener rguenther@suse.de
PR tree-optimization/101178 * tree-vect-slp.c (slpg_vertex::materialize): Remove. (slpg::perm_in): Add. (slpg::get_perm_in): Remove. (slpg::get_perm_materialized): Add. (vect_optimize_slp): Handle VEC_PERM nodes more optimally during permute propagation and materialization.
* gcc.dg/vect/bb-slp-72.c: New testcase. * gcc.dg/vect/bb-slp-73.c: Likewise. * gcc.dg/vect/bb-slp-74.c: Likewise. </cut>
Results regressed to (for first_bad == 7d8211603a3d04384812b481b0ae01205a287a72) # reset_artifacts: -10 # build_abe bootstrap: 0 # build_abe check_bootstrap: 1 # # Comparing directories # # REFERENCE: base-artifacts/sumfiles # # CURRENT: /home/tcwg-buildslave/workspace/tcwg_gnu_2/artifacts/build-7d8211603a3d04384812b481b0ae01205a287a72/sumfiles # # # Comparing 12 common sum files: # g++.sum # gcc.sum # gfortran.sum # go.sum # gotools.sum # libatomic.sum # libffi.sum # libgo.sum # libgomp.sum # libitm.sum # libstdc++.sum # objc.sum # Comparing: # REFERENCE:/tmp/gxx-sum1.3498108 # CURRENT: /tmp/gxx-sum2.3498108 # # ` +---------+---------+ # o RUN STATUS: | REF | RES | # +------------------------------------------+---------+---------+ # | Passes [PASS] | 460520 | 460704 | # | Unexpected fails [FAIL] | 196 | 195 | # | Errors [ERROR] | 0 | 0 | # | Unexpected passes [XPASS] | 15 | 15 | # | Expected fails [XFAIL] | 2737 | 2723 | # | Unresolved [UNRESOLVED] | 104 | 104 | # | Unsupported [UNSUPPORTED] | 22896 | 22903 | # | Untested [UNTESTED] | 10 | 10 | # +------------------------------------------+---------+---------+ # # REF PASS ratio: 0.952267 # RES PASS ratio: 0.952272 # # o REGRESSIONS: # +------------------------------------------+---------+ # | FAIL appears [ => FAIL] | 2 | # +------------------------------------------+---------+ # | TOTAL_REGRESSIONS | 2 | # +------------------------------------------+---------+ # # - FAIL appears [ => FAIL]: # # Executed from: gcc.dg/vect/vect.exp # gcc:gcc.dg/vect/bb-slp-74.c -flto -ffat-lto-objects scan-tree-dump-times slp2 " [^ ]+ = VEC_PERM_EXPR" 1 # gcc:gcc.dg/vect/bb-slp-74.c scan-tree-dump-times slp2 " [^ ]+ = VEC_PERM_EXPR" 1 # # # # o IMPROVEMENTS TO BE CHECKED: # +------------------------------------------+---------+ # | PASS disappears [PASS => ] | 114 | # | New PASS [ => PASS] | 296 | # | FAIL now PASS [FAIL => PASS] | 2 | # | FAIL disappears [FAIL => ] | 1 | # | XFAIL disappears [XFAIL=> ] | 17 | # | XFAIL appears [ =>XFAIL] | 3 | # | UNSUPPORTED appears [ =>UNSUP] | 7 | # +------------------------------------------+---------+ # | TOTAL_IMPROVEMENTS_TO_BE_CHECKED | 440 | # +------------------------------------------+---------+ # # - PASS disappears [PASS => ]: # # Executed from: g++.dg/dg.exp # g++:g++.dg/cpp0x/auto24.C -std=c++14 (test for errors, line 5) # g++:g++.dg/cpp0x/auto24.C -std=c++17 (test for errors, line 5) # g++:g++.dg/cpp0x/auto24.C -std=c++2a (test for errors, line 5) # g++:g++.dg/diagnostic/auto1.C -std=c++17 (test for errors, line 4) # g++:g++.dg/diagnostic/auto1.C -std=c++2a (test for errors, line 4) # Executed from: gcc.dg/analyzer/analyzer.exp # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1007) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1009) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1010) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1013) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1018) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1025) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1026) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 510) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 518) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 519) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 539) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 540) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 557) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 559) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 562) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 565) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 566) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 570) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 573) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 574) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 578) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 579) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 581) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 582) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 586) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 587) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 604) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 606) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 609) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 612) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 613) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 617) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 620) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 621) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 628) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 629) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 632) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 635) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 636) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 654) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 656) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 659) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 662) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 663) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 667) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 670) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 671) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 676) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 678) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 679) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 682) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 684) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 685) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 703) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 705) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 708) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 711) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 712) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 716) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 719) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 720) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 725) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 727) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 728) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 731) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 733) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 744) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 745) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 765) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 769) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 770) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 781) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 787) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 795) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 800) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 801) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 812) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 816) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 842) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 850) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 870) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 873) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 875) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 895) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 908) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 909) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 914) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 923) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 932) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 947) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 950) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 965) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 968) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 1038) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 506) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 511) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 525) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 528) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 532) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 535) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 63) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 67) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 68) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 77) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 81) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 82) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 98) # Executed from: libstdc++-dg/conformance.exp # libstdc++:26_numerics/random/pr60037-neg.cc (test for errors, line 167) # libstdc++:26_numerics/random/pr60037-neg.cc (test for errors, line 3346) # # # - New PASS [ => PASS]: # # Executed from: g++.dg/dg.exp # g++:g++.dg/cpp0x/constexpr-empty16.C -std=c++14 (test for excess errors) # g++:g++.dg/cpp0x/constexpr-empty16.C -std=c++17 (test for excess errors) # g++:g++.dg/cpp0x/constexpr-empty16.C -std=c++2a (test for excess errors) # g++:g++.dg/cpp23/auto-array.C -std=c++14 (test for excess errors) # g++:g++.dg/cpp23/auto-array.C -std=c++17 (test for excess errors) # g++:g++.dg/cpp23/auto-array.C -std=c++2a (test for excess errors) # g++:g++.dg/cpp2a/concepts-access2.C -std=c++2a (test for errors, line 13) # g++:g++.dg/cpp2a/concepts-access2.C -std=c++2a (test for errors, line 4) # g++:g++.dg/cpp2a/concepts-access2.C -std=c++2a (test for excess errors) # g++:g++.dg/template/access41.C -std=c++14 (test for excess errors) # g++:g++.dg/template/access41.C -std=c++17 (test for excess errors) # g++:g++.dg/template/access41.C -std=c++2a (test for excess errors) # g++:g++.dg/template/access41a.C -std=c++14 (test for excess errors) # g++:g++.dg/template/access41a.C -std=c++17 (test for excess errors) # g++:g++.dg/template/access41a.C -std=c++2a (test for excess errors) # Executed from: gcc.misc-tests/help.exp # gcc:compiler driver --help=common option(s): ^ +-.*[^:.]$ # Executed from: gcc.dg/analyzer/analyzer.exp # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 22) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 24) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 25) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 33) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 35) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 36) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 44) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 46) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 47) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 54) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 55) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 67) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 68) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 69) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 70) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 71) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 72) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 73) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 74) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 88) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 89) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 90) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 91) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 92) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 93) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 94) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 95) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 96) # gcc:gcc.dg/analyzer/clobbers-1.c (test for warnings, line 97) # gcc:gcc.dg/analyzer/clobbers-1.c (test for excess errors) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 11) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 12) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 13) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 14) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 15) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 19) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 20) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 21) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 22) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 23) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 24) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 31) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 32) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 33) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 37) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 38) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 39) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 40) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 47) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 48) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 49) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 53) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 54) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 55) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 56) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 63) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 64) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 68) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 69) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 70) # gcc:gcc.dg/analyzer/clobbers-2.c (test for warnings, line 71) # gcc:gcc.dg/analyzer/clobbers-2.c (test for excess errors) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1000) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1003) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1015) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1028) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 1029) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 506) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 508) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 516) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 517) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 523) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 524) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 526) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 527) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 529) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 530) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 546) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 547) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 549) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 550) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 552) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 553) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 555) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 561) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 564) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 568) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 569) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 572) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 576) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 577) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 593) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 594) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 596) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 597) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 599) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 600) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 602) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 608) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 611) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 615) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 616) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 619) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 622) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 643) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 644) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 646) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 647) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 649) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 650) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 652) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 658) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 661) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 665) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 666) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 669) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 672) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 674) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 692) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 693) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 695) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 696) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 698) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 699) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 701) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 707) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 710) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 714) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 715) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 718) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 721) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 723) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 735) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 755) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 759) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 760) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 767) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 771) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 785) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 790) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 791) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 802) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 806) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 832) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 840) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 860) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 863) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 865) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 885) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 898) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 899) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 903) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 904) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 922) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 937) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 940) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 955) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 958) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 996) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 997) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 998) # gcc:gcc.dg/analyzer/data-model-1.c (test for warnings, line 999) # gcc:gcc.dg/analyzer/data-model-1.c status quo (test for warnings, line 509) # gcc:gcc.dg/analyzer/explode-1.c (test for warnings, line 15) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 100) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 110) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 111) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 112) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 126) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 127) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 128) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 129) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 130) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 131) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 132) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 133) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 134) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 135) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 136) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 137) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 138) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 139) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 140) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 141) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 142) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 143) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 144) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 145) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 154) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 155) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 156) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 157) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 158) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 159) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 160) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 161) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 164) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 165) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 166) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 167) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 168) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 169) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 170) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 171) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 174) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 175) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 176) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 177) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 178) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 179) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 180) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 181) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 184) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 185) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 186) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 187) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 188) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 189) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 190) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 191) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 194) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 195) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 196) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 197) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 198) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 199) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 200) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 201) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 39) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 48) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 57) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 61) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 62) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 71) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 75) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 76) # gcc:gcc.dg/analyzer/memset-1.c (test for warnings, line 92) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 100) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 101) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 102) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 103) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 104) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 105) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 106) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 62) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 63) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 64) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 65) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 66) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 67) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 68) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 71) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 72) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 98) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for warnings, line 99) # gcc:gcc.dg/analyzer/memset-CVE-2017-18549-1.c (test for excess errors) # gcc:gcc.dg/analyzer/symbolic-8.c (test for excess errors) # Executed from: gcc.dg/dg.exp # gcc:gcc.dg/pr101254.c (test for excess errors) # gcc:gcc.dg/pr101254.c execution test # gcc:gcc.dg/pr101266.c (test for excess errors) # Executed from: gcc.dg/vect/vect.exp # gcc:gcc.dg/vect/bb-slp-72.c (test for excess errors) # gcc:gcc.dg/vect/bb-slp-72.c -flto -ffat-lto-objects (test for excess errors) # gcc:gcc.dg/vect/bb-slp-72.c -flto -ffat-lto-objects execution test # gcc:gcc.dg/vect/bb-slp-72.c execution test # gcc:gcc.dg/vect/bb-slp-73.c (test for excess errors) # gcc:gcc.dg/vect/bb-slp-73.c -flto -ffat-lto-objects (test for excess errors) # gcc:gcc.dg/vect/bb-slp-73.c -flto -ffat-lto-objects execution test # gcc:gcc.dg/vect/bb-slp-73.c execution test # gcc:gcc.dg/vect/bb-slp-74.c (test for excess errors) # gcc:gcc.dg/vect/bb-slp-74.c -flto -ffat-lto-objects (test for excess errors) # gcc:gcc.dg/vect/bb-slp-74.c -flto -ffat-lto-objects execution test # gcc:gcc.dg/vect/bb-slp-74.c execution test # Executed from: gfortran.dg/dg.exp # gfortran:gfortran.dg/pr101264.f90 -O (test for excess errors) # gfortran:gfortran.dg/pr101267.f90 -O (test for excess errors) # Executed from: libgomp.c++/c++.exp # libgomp:libgomp.c++/../libgomp.c-c++-common/pr94366.c (test for excess errors) # libgomp:libgomp.c++/../libgomp.c-c++-common/pr94366.c execution test # Executed from: libgomp.c/c.exp # libgomp:libgomp.c/../libgomp.c-c++-common/pr94366.c (test for excess errors) # libgomp:libgomp.c/../libgomp.c-c++-common/pr94366.c execution test # Executed from: libstdc++-dg/conformance.exp # libstdc++:26_numerics/random/pr60037-neg.cc (test for errors, line 166) # libstdc++:26_numerics/random/pr60037-neg.cc (test for errors, line 3350) # # # - FAIL now PASS [FAIL => PASS]: # # Executed from: gcc.dg/debug/ctf/ctf.exp # gcc:gcc.dg/debug/ctf/ctf-skip-types-2.c (test for excess errors) # Executed from: go.test/go-test.exp # go:go.test/test/fixedbugs/issue19182.go execution, -O2 -g # # # - FAIL disappears [FAIL => ]: # # Executed from: gcc.misc-tests/help.exp # gcc:compiler driver --help=common option(s): "^ +-.*[^:.]$" absent from output: " -foffload=<targets>=<options> Specify options for the offloading targets" # # # - XFAIL disappears [XFAIL=> ]: # # Executed from: gcc.dg/analyzer/analyzer.exp # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 1038) # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 506) # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 511) # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 525) # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 528) # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 532) # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 535) # gcc:gcc.dg/analyzer/data-model-1.c uninit-warning-removed (test for warnings, line 824) # gcc:gcc.dg/analyzer/data-model-1.c uninit-warning-removed (test for warnings, line 832) # gcc:gcc.dg/analyzer/memset-1.c known nonzero (test for warnings, line 110) # gcc:gcc.dg/analyzer/memset-1.c known nonzero (test for warnings, line 112) # gcc:gcc.dg/analyzer/memset-1.c known nonzero (test for warnings, line 41) # gcc:gcc.dg/analyzer/memset-1.c known nonzero (test for warnings, line 53) # gcc:gcc.dg/analyzer/memset-1.c status quo (test for bogus messages, line 110) # gcc:gcc.dg/analyzer/memset-1.c status quo (test for bogus messages, line 112) # gcc:gcc.dg/analyzer/memset-1.c status quo (test for bogus messages, line 41) # gcc:gcc.dg/analyzer/memset-1.c status quo (test for bogus messages, line 53) # # # - XFAIL appears [ =>XFAIL]: # # Executed from: gcc.dg/analyzer/analyzer.exp # gcc:gcc.dg/analyzer/data-model-1.c desired (test for warnings, line 509) # gcc:gcc.dg/analyzer/data-model-1.c uninit-warning-removed (test for warnings, line 814) # gcc:gcc.dg/analyzer/data-model-1.c uninit-warning-removed (test for warnings, line 822) # # # - UNSUPPORTED appears [ =>UNSUP]: # # Executed from: g++.dg/dg.exp # g++:g++.dg/cpp0x/constexpr-empty16.C -std=c++98 # g++:g++.dg/cpp23/auto-array.C -std=c++98 # g++:g++.dg/cpp2a/concepts-access2.C -std=c++14 # g++:g++.dg/cpp2a/concepts-access2.C -std=c++17 # g++:g++.dg/cpp2a/concepts-access2.C -std=c++98 # g++:g++.dg/template/access41.C -std=c++98 # g++:g++.dg/template/access41a.C -std=c++98 # # # # # Regressions found # # Regressions in 12 common sum files found
from (for last_good == b0ab968999c9af88d45acf552ca673ef3960306a) # reset_artifacts: -10 # build_abe bootstrap: 0 # build_abe check_bootstrap: 1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/... Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/... Build top page/logs: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/
Configuration details:
Reproduce builds: <cut> mkdir investigate-gcc-7d8211603a3d04384812b481b0ae01205a287a72 cd investigate-gcc-7d8211603a3d04384812b481b0ae01205a287a72
git clone https://git.linaro.org/toolchain/jenkins-scripts
mkdir -p artifacts/manifests curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/... --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/... --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/... --fail chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites) ./jenkins-scripts/tcwg_gnu-build.sh @@ artifacts/manifests/build-baseline.sh
cd gcc
# Reproduce first_bad build git checkout --detach 7d8211603a3d04384812b481b0ae01205a287a72 ../artifacts/test.sh
# Reproduce last_good build git checkout --detach b0ab968999c9af88d45acf552ca673ef3960306a ../artifacts/test.sh
cd .. </cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/c...
Artifacts: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/... Build log: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/73/...
Full commit (up to 1000 lines): <cut> commit 7d8211603a3d04384812b481b0ae01205a287a72 Author: Richard Biener rguenther@suse.de Date: Wed Jun 30 16:28:50 2021 +0200
tree-optimization/101178 - handle VEC_PERM in SLP permute propagation
This adds handling of VEC_PERM nodes to SLP permute propagation. Previously VEC_PERM acted as forced materialization of incoming permutes since it is a good place to do that (with the constraint of those only appearing for two-operator nodes). The following patch, in addition to supporting (but not forcing) this, enables VEC_PERM nodes acting as "any" permute on the outgoing side since they also can consume arbitrary permutes on that side.
This again (meh) changes how we represent permutes and materialization on the graph vertices now explicitely having the common incoming permute as well as an outgoing permute and in case both are different the vertex acts as materialization point of the incoming permute.
2021-06-30 Richard Biener rguenther@suse.de
PR tree-optimization/101178 * tree-vect-slp.c (slpg_vertex::materialize): Remove. (slpg::perm_in): Add. (slpg::get_perm_in): Remove. (slpg::get_perm_materialized): Add. (vect_optimize_slp): Handle VEC_PERM nodes more optimally during permute propagation and materialization.
* gcc.dg/vect/bb-slp-72.c: New testcase. * gcc.dg/vect/bb-slp-73.c: Likewise. * gcc.dg/vect/bb-slp-74.c: Likewise. --- gcc/testsuite/gcc.dg/vect/bb-slp-72.c | 29 +++++ gcc/testsuite/gcc.dg/vect/bb-slp-73.c | 29 +++++ gcc/testsuite/gcc.dg/vect/bb-slp-74.c | 30 +++++ gcc/tree-vect-slp.c | 200 ++++++++++++++++++++-------------- 4 files changed, 204 insertions(+), 84 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-72.c b/gcc/testsuite/gcc.dg/vect/bb-slp-72.c new file mode 100644 index 00000000000..5b243fc1ace --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-72.c @@ -0,0 +1,29 @@ +/* { dg-do run } */ + +#include "tree-vect.h" + +double x[2], y[2], z[2], w[2]; + +void __attribute__((noipa)) foo () +{ + double tem0 = x[1] + y[1]; + double tem1 = x[0] - y[0]; + double tem2 = z[1] * tem0; + double tem3 = z[0] * tem1; + z[0] = tem2 - w[0]; + z[1] = tem3 + w[1]; +} + +int main() +{ + check_vect (); + + x[0] = 1.; x[1] = 2.; + y[0] = 7.; y[1] = -5.; + z[0] = 2.; z[1] = 3.; + w[0] = 9.; w[1] = -5.; + foo (); + if (z[0] != -18. || z[1] != -17.) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-73.c b/gcc/testsuite/gcc.dg/vect/bb-slp-73.c new file mode 100644 index 00000000000..d4c8a514b1c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-73.c @@ -0,0 +1,29 @@ +/* { dg-do run } */ + +#include "tree-vect.h" + +double x[2], y[2], z[2], w[2]; + +void __attribute__((noipa)) foo () +{ + double tem0 = x[1] + y[1]; + double tem1 = x[0] - y[0]; + double tem2 = z[1] * tem0; + double tem3 = z[0] * tem1; + z[0] = tem2 - w[1]; + z[1] = tem3 + w[0]; +} + +int main() +{ + check_vect (); + + x[0] = 1.; x[1] = 2.; + y[0] = 7.; y[1] = -5.; + z[0] = 2.; z[1] = 3.; + w[0] = 9.; w[1] = -5.; + foo (); + if (z[0] != -4. || z[1] != -3.) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-74.c b/gcc/testsuite/gcc.dg/vect/bb-slp-74.c new file mode 100644 index 00000000000..d3d5a02a29b --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-74.c @@ -0,0 +1,30 @@ +/* { dg-do run } */ + +#include "tree-vect.h" + +double a[2], b[2], c[2]; + +void __attribute__((noipa)) foo () +{ + double tem0 = a[1] + b[1]; + double tem1 = a[0] - b[0]; + c[0] = 2. * tem0; + c[1] = 5. * tem1; +} + +int main() +{ + check_vect (); + + a[0] = 1.; a[1] = 3.; + b[0] = -5.; b[1] = 13.; + foo (); + if (c[0] != 32. || c[1] != 30.) + __builtin_abort (); + return 0; +} + +/* We'd like to see at most one VEC_PERM_EXPR, not one for a blend + and one for a permute materialized somewhere else. But addsub + pattern recog can likely get in the way here. */ +/* { dg-final { scan-tree-dump-times " [^ ]+ = VEC_PERM_EXPR" 1 "slp2" } } */ diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 10195d3629f..966b281ffae 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -3470,16 +3470,19 @@ vect_analyze_slp (vec_info *vinfo, unsigned max_tree_size) struct slpg_vertex { slpg_vertex (slp_tree node_) - : node (node_), perm_out (-1), materialize (0) {} + : node (node_), perm_in (-1), perm_out (-1) {}
- int get_perm_in () const { return materialize ? materialize : perm_out; } + int get_perm_materialized () const + { return perm_in != perm_out ? perm_in : 0; }
slp_tree node; - /* The permutation on the outgoing lanes (towards SLP parents). */ + /* The common permutation on the incoming lanes (towards SLP children). */ + int perm_in; + /* The permutation on the outgoing lanes (towards SLP parents). When + the node is a materialization point for a permute this differs + from perm_in (and is then usually zero). Materialization happens + on the input side. */ int perm_out; - /* The permutation that is applied by this node. perm_out is - relative to this. */ - int materialize; };
/* Fill the vertices and leafs vector with all nodes in the SLP graph. */ @@ -3614,7 +3617,11 @@ vect_optimize_slp (vec_info *vinfo) /* Leafs do not change across iterations. Note leafs also double as entries to the reverse graph. */ if (!slpg->vertices[idx].succ) - vertices[idx].perm_out = 0; + { + vertices[idx].perm_in = 0; + vertices[idx].perm_out = 0; + } + /* Loads are the only thing generating permutes. */ if (!SLP_TREE_LOAD_PERMUTATION (node).exists ()) continue; @@ -3663,6 +3670,7 @@ vect_optimize_slp (vec_info *vinfo) for (unsigned j = 0; j < SLP_TREE_LANES (node); ++j) perm[j] = SLP_TREE_LOAD_PERMUTATION (node)[j] - imin; perms.safe_push (perm); + vertices[idx].perm_in = perms.length () - 1; vertices[idx].perm_out = perms.length () - 1; }
@@ -3702,8 +3710,11 @@ vect_optimize_slp (vec_info *vinfo) if (STMT_VINFO_DATA_REF (rep) && DR_IS_WRITE (STMT_VINFO_DATA_REF (rep))) { + /* ??? We're forcing materialization in place + of the child here, we'd need special handling + in materialization to leave perm_in -1 here. */ + vertices[idx].perm_in = 0; vertices[idx].perm_out = 0; - continue; } /* We cannot move a permute across an operation that is not independent on lanes. Note this is an explicit @@ -3717,20 +3728,19 @@ vect_optimize_slp (vec_info *vinfo) case CFN_COMPLEX_MUL: case CFN_COMPLEX_MUL_CONJ: case CFN_VEC_ADDSUB: + vertices[idx].perm_in = 0; vertices[idx].perm_out = 0; - continue; default:; } }
- int perm; if (!slpg->vertices[idx].succ) /* Pick up pre-computed leaf values. */ - perm = vertices[idx].perm_out; + ; else { bool any_succ_perm_out_m1 = false; - perm = vertices[idx].get_perm_in (); + int perm_in = vertices[idx].perm_in; for (graph_edge *succ = slpg->vertices[idx].succ; succ; succ = succ->succ_next) { @@ -3752,18 +3762,18 @@ vect_optimize_slp (vec_info *vinfo) any_succ_perm_out_m1 = true; continue; } - if (perm == -1) - perm = succ_perm; + if (perm_in == -1) + perm_in = succ_perm; else if (succ_perm == 0 - || !vect_slp_perms_eq (perms, perm, succ_perm)) + || !vect_slp_perms_eq (perms, perm_in, succ_perm)) { - perm = 0; + perm_in = 0; break; } }
/* Adjust any incoming permutes we treated optimistically. */ - if (perm != -1 && any_succ_perm_out_m1) + if (perm_in != -1 && any_succ_perm_out_m1) { for (graph_edge *succ = slpg->vertices[idx].succ; succ; succ = succ->succ_next) @@ -3772,24 +3782,36 @@ vect_optimize_slp (vec_info *vinfo) if (vertices[succ->dest].perm_out == -1 && SLP_TREE_DEF_TYPE (succ_node) != vect_external_def && SLP_TREE_DEF_TYPE (succ_node) != vect_constant_def) - vertices[succ->dest].perm_out = perm; + { + vertices[succ->dest].perm_out = perm_in; + /* And ensure this propagates. */ + if (vertices[succ->dest].perm_in == -1) + vertices[succ->dest].perm_in = perm_in; + } } changed = true; }
- if (!vect_slp_perms_eq (perms, perm, - vertices[idx].get_perm_in ())) + if (!vect_slp_perms_eq (perms, perm_in, + vertices[idx].perm_in)) { /* Make sure we eventually converge. */ - gcc_checking_assert (vertices[idx].get_perm_in () == -1 - || perm == 0); - if (perm == 0) - { - vertices[idx].perm_out = 0; - vertices[idx].materialize = 0; - } - if (!vertices[idx].materialize) - vertices[idx].perm_out = perm; + gcc_checking_assert (vertices[idx].perm_in == -1 + || perm_in == 0); + vertices[idx].perm_in = perm_in; + + /* While we can handle VEC_PERM nodes as transparent + pass-through they can be a cheap materialization + point as well. In addition they can act as source + of a random permutation as well. + The following ensures that former materialization + points that now have zero incoming permutes no + longer appear as such and that former "any" permutes + get pass-through. We keep VEC_PERM nodes optimistic + as "any" outgoing permute though. */ + if (vertices[idx].perm_out != 0 + && SLP_TREE_CODE (node) != VEC_PERM_EXPR) + vertices[idx].perm_out = perm_in; changed = true; } } @@ -3799,25 +3821,19 @@ vect_optimize_slp (vec_info *vinfo) if (!do_materialization) continue;
+ int perm = vertices[idx].perm_out; if (perm == 0 || perm == -1) continue;
/* Decide on permute materialization. Look whether there's a use (pred) edge that is permuted differently than us. - In that case mark ourselves so the permutation is applied. - For VEC_PERM_EXPRs the permutation doesn't carry along - from children to parents so force materialization at the - point of the VEC_PERM_EXPR. In principle VEC_PERM_EXPRs - are a source of an arbitrary permutation again, similar - to constants/externals - that's something we do not yet - optimally handle. */ - bool all_preds_permuted = (SLP_TREE_CODE (node) != VEC_PERM_EXPR - && slpg->vertices[idx].pred != NULL); + In that case mark ourselves so the permutation is applied. */ + bool all_preds_permuted = slpg->vertices[idx].pred != NULL; if (all_preds_permuted) for (graph_edge *pred = slpg->vertices[idx].pred; pred; pred = pred->pred_next) { - int pred_perm = vertices[pred->src].get_perm_in (); + int pred_perm = vertices[pred->src].perm_in; gcc_checking_assert (pred_perm != -1); if (!vect_slp_perms_eq (perms, perm, pred_perm)) { @@ -3827,10 +3843,8 @@ vect_optimize_slp (vec_info *vinfo) } if (!all_preds_permuted) { - if (!vertices[idx].materialize) - changed = true; - vertices[idx].materialize = perm; vertices[idx].perm_out = 0; + changed = true; } }
@@ -3848,46 +3862,43 @@ vect_optimize_slp (vec_info *vinfo) /* Materialize. */ for (i = 0; i < vertices.length (); ++i) { - int perm = vertices[i].get_perm_in (); - if (perm <= 0) - continue; - + int perm_in = vertices[i].perm_in; slp_tree node = vertices[i].node;
- /* First permute invariant/external original successors. */ + /* First permute invariant/external original successors, we handle + those optimistically during propagation and duplicate them if + they are used with different permutations. */ unsigned j; slp_tree child; - FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), j, child) - { - if (!child - || (SLP_TREE_DEF_TYPE (child) != vect_constant_def - && SLP_TREE_DEF_TYPE (child) != vect_external_def)) - continue; + if (perm_in > 0) + FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), j, child) + { + if (!child + || (SLP_TREE_DEF_TYPE (child) != vect_constant_def + && SLP_TREE_DEF_TYPE (child) != vect_external_def)) + continue;
- /* If the vector is uniform there's nothing to do. */ - if (vect_slp_tree_uniform_p (child)) - continue; + /* If the vector is uniform there's nothing to do. */ + if (vect_slp_tree_uniform_p (child)) + continue;
- /* We can end up sharing some externals via two_operator - handling. Be prepared to unshare those. */ - if (child->refcnt != 1) - { - gcc_assert (slpg->vertices[child->vertex].pred->pred_next); - SLP_TREE_CHILDREN (node)[j] = child - = vect_create_new_slp_node - (SLP_TREE_SCALAR_OPS (child).copy ()); - } - vect_slp_permute (perms[perm], - SLP_TREE_SCALAR_OPS (child), true); - } + /* We can end up sharing some externals via two_operator + handling. Be prepared to unshare those. */ + if (child->refcnt != 1) + { + gcc_assert (slpg->vertices[child->vertex].pred->pred_next); + SLP_TREE_CHILDREN (node)[j] = child + = vect_create_new_slp_node + (SLP_TREE_SCALAR_OPS (child).copy ()); + } + vect_slp_permute (perms[perm_in], + SLP_TREE_SCALAR_OPS (child), true); + }
- if (vertices[i].materialize) + if (SLP_TREE_CODE (node) == VEC_PERM_EXPR) { - if (SLP_TREE_LOAD_PERMUTATION (node).exists ()) - /* For loads simply drop the permutation, the load permutation - already performs the desired permutation. */ - ; - else if (SLP_TREE_LANE_PERMUTATION (node).exists ()) + /* Apply the common permutes to the input vectors. */ + if (perm_in > 0) { /* If the node is already a permute node we can apply the permutation to the lane selection, effectively @@ -3896,12 +3907,30 @@ vect_optimize_slp (vec_info *vinfo) dump_printf_loc (MSG_NOTE, vect_location, "simplifying permute node %p\n", node); - for (unsigned k = 0; k < SLP_TREE_LANE_PERMUTATION (node).length (); ++k) SLP_TREE_LANE_PERMUTATION (node)[k].second - = perms[perm][SLP_TREE_LANE_PERMUTATION (node)[k].second]; + = perms[perm_in][SLP_TREE_LANE_PERMUTATION (node)[k].second]; + } + /* Apply the anticipated output permute to the permute and + stmt vectors. */ + int perm_out = vertices[i].perm_out; + if (perm_out > 0) + { + vect_slp_permute (perms[perm_out], + SLP_TREE_SCALAR_STMTS (node), true); + vect_slp_permute (perms[perm_out], + SLP_TREE_LANE_PERMUTATION (node), true); } + } + else if (vertices[i].get_perm_materialized () != 0) + { + if (SLP_TREE_LOAD_PERMUTATION (node).exists ()) + /* For loads simply drop the permutation, the load permutation + already performs the desired permutation. */ + ; + else if (SLP_TREE_LANE_PERMUTATION (node).exists ()) + gcc_unreachable (); else { if (dump_enabled_p ()) @@ -3916,7 +3945,7 @@ vect_optimize_slp (vec_info *vinfo) SLP_TREE_CHILDREN (node) = vNULL; SLP_TREE_SCALAR_STMTS (copy) = SLP_TREE_SCALAR_STMTS (node).copy (); - vect_slp_permute (perms[perm], + vect_slp_permute (perms[perm_in], SLP_TREE_SCALAR_STMTS (copy), true); gcc_assert (!SLP_TREE_SCALAR_OPS (node).exists ()); SLP_TREE_REPRESENTATIVE (copy) = SLP_TREE_REPRESENTATIVE (node); @@ -3936,28 +3965,31 @@ vect_optimize_slp (vec_info *vinfo) SLP_TREE_LANE_PERMUTATION (node).create (SLP_TREE_LANES (node)); for (unsigned j = 0; j < SLP_TREE_LANES (node); ++j) SLP_TREE_LANE_PERMUTATION (node) - .quick_push (std::make_pair (0, perms[perm][j])); + .quick_push (std::make_pair (0, perms[perm_in][j])); SLP_TREE_CODE (node) = VEC_PERM_EXPR; } } - else + else if (perm_in > 0) /* perm_in == perm_out */ { /* Apply the reverse permutation to our stmts. */ - vect_slp_permute (perms[perm], + vect_slp_permute (perms[perm_in], SLP_TREE_SCALAR_STMTS (node), true); - /* And to the load permutation, which we can simply + /* And to the lane/load permutation, which we can simply make regular by design. */ if (SLP_TREE_LOAD_PERMUTATION (node).exists ()) { + gcc_assert (!SLP_TREE_LANE_PERMUTATION (node).exists ()); /* ??? When we handle non-bijective permutes the idea is that we can force the load-permutation to be { min, min + 1, min + 2, ... max }. But then the scalar defs might no longer match the lane content which means wrong-code with live lane vectorization. So we possibly have to have NULL entries for those. */ - vect_slp_permute (perms[perm], + vect_slp_permute (perms[perm_in], SLP_TREE_LOAD_PERMUTATION (node), true); } + else if (SLP_TREE_LANE_PERMUTATION (node).exists ()) + gcc_unreachable (); } }
@@ -3991,14 +4023,14 @@ vect_optimize_slp (vec_info *vinfo) } else if (SLP_TREE_LOAD_PERMUTATION (old).exists () && SLP_TREE_REF_COUNT (old) == 1 - && vertices[old->vertex].materialize) + && vertices[old->vertex].get_perm_materialized () != 0) { /* ??? For loads the situation is more complex since we can't modify the permute in place in case the node is used multiple times. In fact for loads this should be somehow handled in the propagation engine. */ /* Apply the reverse permutation to our stmts. */ - int perm = vertices[old->vertex].get_perm_in (); + int perm = vertices[old->vertex].get_perm_materialized (); vect_slp_permute (perms[perm], SLP_TREE_SCALAR_STMTS (old), true); vect_slp_permute (perms[perm], </cut>