public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/108776] new test case c-c++-common/rotate-11.c from r12-9158-ga015ebe382cd6d fails Date: Thu, 11 May 2023 07:13:57 +0000 [thread overview] Message-ID: <bug-108776-4-aVA5Rkt56W@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108776-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108776 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target|powerpc64le-linux-gnu |powerpc64le-linux-gnu | |s390x-linux-gnu Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC| |rguenth at gcc dot gnu.org Last reconfirmed| |2023-05-11 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Also fails on s390x. On ppc64le we only have four r<<, baz() and qux() are not handled (why do we have 6 functions but expect 5 rotates only without checking exactly which function we expect not to transform?). On trunk we handle baz() fine but still do not handle qux(). The IL into forwprop1 is the same so it's likely differences in ranger behavior triggering here. branch: ;; Function baz (baz, funcdef_no=2, decl_uid=3331, cgraph_uid=3, symbol_order=2) 326 range_of_expr(y_11(D)) at stmt _2 = _1 << y_11(D); 327 range_on_entry (y_11(D)) to BB 5 328 range_of_stmt (y_11(D)) at stmt GIMPLE_NOP GLOBAL : UPDATE cache for y_11(D) in BB 0 : successors : : No updates! TRUE : (328) range_of_stmt (y_11(D)) unsigned int VARYING y_11(D) : CACHE: BB 5 DOM query, found unsigned int VARYING at BB0 CACHE: Range for DOM returns : unsigned int VARYING Filled from dominator! : unsigned int VARYING TRUE : (327) range_on_entry (y_11(D)) unsigned int VARYING TRUE : (326) range_of_expr (y_11(D)) unsigned int VARYING unsigned char baz (unsigned char x, unsigned int y) trunk: ;; Function baz (baz, funcdef_no=2, decl_uid=3954, cgraph_uid=3, symbol_order=2) 299 range_of_expr(y_11(D)) at stmt _2 = _1 << y_11(D); 300 range_on_entry (y_11(D)) to BB 5 301 range_of_stmt (y_11(D)) at stmt GIMPLE_NOP GLOBAL : UPDATE cache for y_11(D) in BB 0 : successors : : No updates! TRUE : (301) range_of_stmt (y_11(D)) [irange] unsigned int VARYING y_11(D) : CACHE: BB 5 DOM query for y_11(D), found [irange] unsigned int VARYING at BB0 302 GORI outgoing_edge for y_11(D) on edge 2->5 303 GORI compute op 1 (y_11(D)) at if (y_11(D) > 8) GORI LHS =[irange] _Bool [0, 0] NONZERO 0x0 GORI Computes y_11(D) = [irange] unsigned int [0, 8] NONZERO 0xf intersect Known range : [irange] unsigned int VARYING GORI TRUE : (303) produces (y_11(D)) [irange] unsigned int [0, 8] NONZERO 0xf GORI TRUE : (302) outgoing_edge (y_11(D)) [irange] unsigned int [0, 8] NONZERO 0xf CACHE: BB 3 DOM query for y_11(D), found [irange] unsigned int VARYING at BB2 304 GORI outgoing_edge for y_11(D) on edge 2->3 305 GORI compute op 1 (y_11(D)) at if (y_11(D) > 8) GORI LHS =[irange] _Bool [1, 1] GORI Computes y_11(D) = [irange] unsigned int [9, +INF] intersect Known range : [irange] unsigned int VARYING GORI TRUE : (305) produces (y_11(D)) [irange] unsigned int [9, +INF] GORI TRUE : (304) outgoing_edge (y_11(D)) [irange] unsigned int [9, +INF] CACHE: Adjusted edge range for 2->3 : [irange] unsigned int [9, +INF] CACHE: Range for DOM returns : [irange] unsigned int [9, +INF] 306 GORI outgoing_edge for y_11(D) on edge 3->5 307 GORI compute op 1 (y_11(D)) at if (y_11(D) != 16) GORI LHS =[irange] _Bool [0, 0] NONZERO 0x0 GORI Computes y_11(D) = [irange] unsigned int [16, 16] NONZERO 0x10 intersect Known range : [irange] unsigned int VARYING GORI TRUE : (307) produces (y_11(D)) [irange] unsigned int [16, 16] NONZERO 0x10 GORI TRUE : (306) outgoing_edge (y_11(D)) [irange] unsigned int [16, 16] NONZERO 0x10 CACHE: Range for DOM returns : [irange] unsigned int [0, 8][16, 16] NONZERO 0x1f Filled from dominator! : [irange] unsigned int [0, 8][16, 16] NONZERO 0x1f TRUE : (300) range_on_entry (y_11(D)) [irange] unsigned int [0, 8][16, 16] NONZERO 0x1f TRUE : (299) range_of_expr (y_11(D)) [irange] unsigned int [0, 8][16, 16] NONZERO 0x1f gimple_simplified to _14 = _16; Removing dead stmt _14 = _16; unsigned char baz (unsigned char x, unsigned int y) On x86_64 the IL into forwprop1 is different (logical-op-non-short-circuit): ppc64le: <bb 2> : if (y_11(D) > 8) goto <bb 3>; [INV] else goto <bb 5>; [INV] <bb 3> : if (y_11(D) != 16) goto <bb 4>; [INV] else goto <bb 5>; [INV] x86_64: <bb 2> : _1 = y_14(D) > 8; _2 = y_14(D) != 16; _3 = _1 & _2; if (_3 != 0) goto <bb 3>; [INV] else goto <bb 4>; [INV] Setting --param logical-op-non-short-circuit=1 fixes the testcase for ppc64le on the branch, I suspect it will be the same for s390x.
next prev parent reply other threads:[~2023-05-11 7:13 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-13 16:23 [Bug testsuite/108776] New: " seurer at gcc dot gnu.org 2023-05-11 7:13 ` rguenth at gcc dot gnu.org [this message] 2023-05-11 7:21 ` [Bug testsuite/108776] " jakub at gcc dot gnu.org 2023-05-11 7:31 ` rguenth at gcc dot gnu.org 2023-05-15 8:24 ` cvs-commit at gcc dot gnu.org 2023-05-15 8:24 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108776-4-aVA5Rkt56W@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).