From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by sourceware.org (Postfix) with ESMTPS id 1FE33385840D for ; Wed, 15 May 2024 03:04:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1FE33385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1FE33385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715742275; cv=none; b=s8WOnVXfe2Bu1DaJ38VoYLQiUIU8AvNjf0rI96+fyHnaWLLdLK7hG3Qzmjhrbvif8jI7ivNCUimqChl3nErwjGYqx8O3XJeuCQ26dnVPMWdrYvzVxJnFzq3I8Ko9+Jvwxbv9bL5pD0ovLikUHNh5ZbE6qDpC5ELLpryS7QfjJLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715742275; c=relaxed/simple; bh=zIDupfwXr51UhWoYDpUnIhdUZP90cKVOxxgMm3MhH1E=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=UCN83hXJtf8DBxeiTVe/z2I2+YMIYtjS/r4eMAoRWp/u5KyS7l6IF+mU4TcqKYVFJmkQvwIdkvZHqDaf+PSiHjMaFUSmsXUyrRRggCR7gCr9uzK29DR+oh6oJqkc5gI66jKfCPPmYBu4pM8ulrQc139gMv1jNAGjDCyGkDYVtaU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715742274; x=1747278274; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zIDupfwXr51UhWoYDpUnIhdUZP90cKVOxxgMm3MhH1E=; b=kbs9ZEjUPnvNeSi5GwEoX11iWqa29CLdT2KyxGn4p/Sg3o/XF1LZsAJE PrC57na/LNg/pPn+mXSX1yLgJ175S/qFxHpzss8evtoylBmXz+p+ES33P /Og2T+Wgzqe7/DZ6F5h8p4BFKEl2NZls37D1mqdSzsv9DK01iL0gre1FZ tujpXC9eeuhPW04Mvd3c5VP9FywKJSGsn0kR/yNWh1dsC9rcmVJeemzYH /YQtDs6bdruA9moV8IRPZqKjSh3AfAaL5efa6/XJq5OPw6CwTszVjlUyd t87JnXXeHRZt6YKZWqOHxlmtLOwo2dOM5JRDYofWh7S+qW1BEpR2Fhm2m w==; X-CSE-ConnectionGUID: PJq38pwdRCOZmPb4+G1D2A== X-CSE-MsgGUID: 370ZqLBJQzOJnZv96PGCQQ== X-IronPort-AV: E=McAfee;i="6600,9927,11073"; a="22369362" X-IronPort-AV: E=Sophos;i="6.08,160,1712646000"; d="scan'208";a="22369362" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2024 20:04:32 -0700 X-CSE-ConnectionGUID: 50yBtQ3uS2aYZbNz/D0zig== X-CSE-MsgGUID: X/W4IogARjW9HUZKVF1QjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,160,1712646000"; d="scan'208";a="31320617" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orviesa006.jf.intel.com with ESMTP; 14 May 2024 20:04:30 -0700 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 3A7CB10077F0; Wed, 15 May 2024 11:04:29 +0800 (CST) From: Haochen Jiang To: gcc-patches@gcc.gnu.org Cc: hongtao.liu@intel.com, ubizjak@gmail.com Subject: [PATCH 1/2] Adjust generic loop alignment from 16:11:8 to 16 for Intel processors Date: Wed, 15 May 2024 11:04:28 +0800 Message-Id: <20240515030429.2575440-2-haochen.jiang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240515030429.2575440-1-haochen.jiang@intel.com> References: <20240515030429.2575440-1-haochen.jiang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_NONE,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 List-Id: Previously, we use 16:11:8 in generic tune for Intel processors, which lead to cross cache line issue and result in some random performance penalty in benchmarks with small loops commit to commit. After changing to always aligning to 16 bytes, it will somehow solve the issue. gcc/ChangeLog: * config/i386/x86-tune-costs.h (generic_cost): Change from 16:11:8 to 16. --- gcc/config/i386/x86-tune-costs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/i386/x86-tune-costs.h b/gcc/config/i386/x86-tune-costs.h index 65d7d1f7e42..d3aaaa4b5cc 100644 --- a/gcc/config/i386/x86-tune-costs.h +++ b/gcc/config/i386/x86-tune-costs.h @@ -3758,7 +3758,7 @@ struct processor_costs generic_cost = { generic_memset, COSTS_N_INSNS (4), /* cond_taken_branch_cost. */ COSTS_N_INSNS (2), /* cond_not_taken_branch_cost. */ - "16:11:8", /* Loop alignment. */ + "16", /* Loop alignment. */ "16:11:8", /* Jump alignment. */ "0:0:8", /* Label alignment. */ "16", /* Func alignment. */ -- 2.31.1