From patchwork Wed Jul 3 07:16:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1956012 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NJIzzQvM; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+eWxv7BK; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NJIzzQvM; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+eWxv7BK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WDWKm0sBhz1xpP for ; Wed, 3 Jul 2024 17:16:28 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62F913860765 for ; Wed, 3 Jul 2024 07:16:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 9BFA73860757 for ; Wed, 3 Jul 2024 07:16:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BFA73860757 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BFA73860757 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719990965; cv=none; b=qxWim6mgdGc27ahusu3LpulLHHwWaBDzQKPLi/Knx1NZkGsla3D9zbdkD3Jfa5+3+D9ApaHHVKx+qGLRiQccVW7X8R///CCHkNTzsasO60W4xAD6Y1bgFEhnYI/xxRjN6YwlxqGLyoW8t7gcaL0/ujwIGHVBdHhBPNkOcBv7LMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719990965; c=relaxed/simple; bh=6ZYKqlWowuKHZO7GRFQPywn7NmCGCGFB7w0SWR6ljW8=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:MIME-Version; b=g8SX1F7+ePtPOjOdoJs9TafpTqAvVZ+nsA5r/3zn+NkgV41jp0NzYuNNesyUslCcrEWwfcOPnQN6VkI5upual1I/GIc4o0SUoqPm0vSl429W9xPXnlDlN/bTW86a/259LKdYoHJnqeobJtFfLFInKnXyRYLgjfRelj/TyZNKNic= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from murzim.nue2.suse.org (unknown [10.168.4.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8BCFD21B69 for ; Wed, 3 Jul 2024 07:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719990962; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=cSdHFbyaEcF1XheNHpp2XuV8SLCUtDnnPQfdWV9tcRE=; b=NJIzzQvMk/lC7/C6kSmBEsjTUmn9Go3sydFn+wV1nhy8u0uh2ScV9PEczQ0Bwg7v0utYu3 2BJTx6xS8LBvXM9ay7r7+K6Nf15QvxN4hFQG5NlIr6VL5U4SPdQx2Uq/qIK4fTmvAYyvhk 87v/xF39OaWp7UCjbdmrlmLHHq2VMyM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719990962; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=cSdHFbyaEcF1XheNHpp2XuV8SLCUtDnnPQfdWV9tcRE=; b=+eWxv7BKtFhdU6uGN9d8HosFProzymbawW5T86UGBlh98oNhBa35pN9f9E4adEJ00fFP8m PNLUuI7XcOwQbhCA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719990962; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=cSdHFbyaEcF1XheNHpp2XuV8SLCUtDnnPQfdWV9tcRE=; b=NJIzzQvMk/lC7/C6kSmBEsjTUmn9Go3sydFn+wV1nhy8u0uh2ScV9PEczQ0Bwg7v0utYu3 2BJTx6xS8LBvXM9ay7r7+K6Nf15QvxN4hFQG5NlIr6VL5U4SPdQx2Uq/qIK4fTmvAYyvhk 87v/xF39OaWp7UCjbdmrlmLHHq2VMyM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719990962; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=cSdHFbyaEcF1XheNHpp2XuV8SLCUtDnnPQfdWV9tcRE=; b=+eWxv7BKtFhdU6uGN9d8HosFProzymbawW5T86UGBlh98oNhBa35pN9f9E4adEJ00fFP8m PNLUuI7XcOwQbhCA== Date: Wed, 3 Jul 2024 09:16:02 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] tree-optimization/115764 - testcase for BB SLP issue MIME-Version: 1.0 X-Spam-Score: -1.79 X-Spam-Level: X-Spamd-Result: default: False [-1.79 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MISSING_MID(2.50)[]; NEURAL_HAM_LONG(-0.99)[-0.992]; NEURAL_HAM_SHORT(-0.20)[-0.980]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; URIBL_BLOCKED(0.00)[murzim.nue2.suse.org:helo]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[] X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Message-Id: <20240703071626.62F913860765@sourceware.org> The following adds a testcase for a CSE issue with BB SLP two operator handling when we make those CSE aware by providing SLP_TREE_SCALAR_STMTS for them. This was reduced from 526.blender_r. Tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/115764 * gcc.dg/vect/bb-slp-76.c: New testcase. --- gcc/testsuite/gcc.dg/vect/bb-slp-76.c | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/vect/bb-slp-76.c diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-76.c b/gcc/testsuite/gcc.dg/vect/bb-slp-76.c new file mode 100644 index 00000000000..b3b6a58e7c7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-76.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-ffast-math" } */ + +typedef struct { + float xmin, xmax; +} rctf; +int U_0; +float BLI_rctf_size_x_rct_1, view_zoomdrag_apply_dx; +void *view_zoomdrag_apply_op_0; +float RNA_float_get(); +typedef struct { + rctf cur; +} View2D; +typedef struct { + View2D v2d; +} v2dViewZoomData; +void view_zoomdrag_apply() { + v2dViewZoomData *vzd = view_zoomdrag_apply_op_0; + View2D *v2d = &vzd->v2d; + view_zoomdrag_apply_dx = RNA_float_get(); + if (U_0) { + float mval_fac = BLI_rctf_size_x_rct_1, mval_faci = mval_fac, + ofs = mval_faci * view_zoomdrag_apply_dx; + v2d->cur.xmin += ofs + view_zoomdrag_apply_dx; + v2d->cur.xmax += ofs - view_zoomdrag_apply_dx; + } else { + v2d->cur.xmin += view_zoomdrag_apply_dx; + v2d->cur.xmax -= view_zoomdrag_apply_dx; + } +}