From patchwork Fri Sep 29 10:27:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manos Anagnostakis X-Patchwork-Id: 146482 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3921399vqu; Fri, 29 Sep 2023 03:28:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpY02s8BM3vJLYK8+YX5fs5KPMJWlc7lON0h/9hZsHYLfgEQBcSz1bDfr4lm+McUoZ0vTH X-Received: by 2002:a05:6402:1658:b0:530:8488:b9bb with SMTP id s24-20020a056402165800b005308488b9bbmr3489604edx.15.1695983328437; Fri, 29 Sep 2023 03:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695983328; cv=none; d=google.com; s=arc-20160816; b=hUO0oB8mzDtZvlkMzAwfTGwPprJKwJ486MUVCqtHJaVctrM+Qe2fcBRqweKwqYEEH/ To4+SSozGlyfP/tOQGNhveNJIOEfvnFeoO8+SZSnQH5FmXGdcwpMnXUn4XufmIUDleY6 dqtr+KKi18mTXildutB5z6gvHLEu0kPVJ05A0Y11qDMgLuiovo5oza7ntjqZlUG9SGEi 570+GblHj/t9wubpRGl1farGGb7rX/hmpQO/4D+0f+PBRLvN2n10aZ2TGjPBfcuo1LGL NPQNLLTByEQ3OJjX0cB2YEcsjKdpHoPcZIWWWd5ocR1HHAYJfsz7e4QA6eTD/zU0cbXz Z8Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=qv0hfjLHCoaRwy1eA/7PxL/auccAceY3iSB4kwbZaqQ=; fh=Fy2l74ivpUK6YmiG7YmhGbcVsgCOKIaM36wogmWqNoc=; b=IVut44Fc4/RasO7Mdjrd9YnhtIahS+N3j+Xx4QGx4tzsLhnJeNlTtKisugeZ4edv3+ 8zf8RWEINHVs6M4clEn5k4bAp5H8QGctspcos3snJ1Z7ghUUAlUXViysRSH8Tjg8VW9d UYDA3Fy9CIttHLm5uI+YkdfeIRubv/faxNIKZ5ShhBGACmi5hKESawlr7yOSkzGZs1/A q7vazpj2NtwFYrHpg2YFCbQk/Kxr0BvEm1IH5LMRpHnUzCNubpeRbPiFwXbY6v0G1bN4 qzpOrypEY9O+dQgb7EJtaUg1qOHB/TVUSD2pdHvsGQmdBhAgpDfSQbMFYcxb1GHa12GI cUWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=cnfmSEA6; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f18-20020aa7d852000000b00529fbef0386si8929857eds.591.2023.09.29.03.28.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 03:28:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=cnfmSEA6; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 342B838313A7 for ; Fri, 29 Sep 2023 10:28:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id AF18F3858C78 for ; Fri, 29 Sep 2023 10:27:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF18F3858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9a65f9147ccso1817060666b.1 for ; Fri, 29 Sep 2023 03:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1695983264; x=1696588064; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qv0hfjLHCoaRwy1eA/7PxL/auccAceY3iSB4kwbZaqQ=; b=cnfmSEA6PC1sBvKCuEh5S0ngwbWsPJulQ3Z5rQHb99btX6wfCL/rJmp+zJ6500BNig zhthCDSPxp76lE9qaGHaizP/M/lSWksEGFYT07jPRbLH9wKd/No8Xk8DgmmJRA6K2fDv qNBg5qr2njQpiafGEr2Iq8aY2Ww7QJkyjFaTSHS0DxzYbdflaWIaPgRB8kxe8hipAX8Z EAn+bCB0JihLVK0JktjeOCOYflkhbSPqJyKnqbwjPxGmvrXDWQpOt9Pw3geubO/vLg2M aPFC1oeMn+B/Qc0YNxKpbvclklHzAQ+XCCzEekPVsolXcuVScJxRxhLTS+X6/5i7sf1n +mug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695983264; x=1696588064; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qv0hfjLHCoaRwy1eA/7PxL/auccAceY3iSB4kwbZaqQ=; b=pSuUbv01QlQTGh/cRfSZ7/fFkqVpVQ1LYljkEtaxBi3WWai6bLy3J6G+6KTLBCPaGh WLqpGIQYKHNPEwPV7QlFdHtuv0JYNLp+6nUy0LZICIZlZZo6YoA+9VPdcaZY8Cw6DI9u b6OdhWK2dZoI2YwN/tVfjZGG97RvPaNlyO7ZstnfYdD3n0ZJwaD+yoMTa7cxOp94z46s i16t6gMabXPzfYhlwR0QUChdXLstzYYjCitNhdJX0TZlbyo/GoeYRrQWaOeUsdJl4Qit ygxS0ZZTqXJKYUBaE8qmXJozMCDYACPkDvteOsdi3WXwlmiMdjhkgMj/vDyzORD/pofS DfxA== X-Gm-Message-State: AOJu0Yy06IMdjZ2hVfi/K3t8oMkfgUNXbmnLA9yV5PZ96Scr35Q0uaPu KhCrGKkdfeXEA/Gl+jIYaRiFLYPthMv2J4cP78A= X-Received: by 2002:a17:906:3094:b0:9b2:6f52:5868 with SMTP id 20-20020a170906309400b009b26f525868mr3675818ejv.48.1695983263803; Fri, 29 Sep 2023 03:27:43 -0700 (PDT) Received: from localhost.localdomain (adsl-225.79.107.6.tellas.gr. [79.107.6.225]) by smtp.gmail.com with ESMTPSA id t16-20020a1709066bd000b009ad8d444be4sm12194166ejs.43.2023.09.29.03.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 03:27:43 -0700 (PDT) From: Manos Anagnostakis To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Philipp Tomsich , Manos Anagnostakis Subject: [PATCH v2] aarch64: Improve on ldp-stp policies code structure. Date: Fri, 29 Sep 2023 13:27:15 +0300 Message-Id: <20230929102715.31028-1-manos.anagnostakis@vrull.eu> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778367414906954621 X-GMAIL-MSGID: 1778367414906954621 Improves on: 834fc2bf This improves the code structure of the ldp-stp policies patch introduced in 834fc2bf Bootstrapped and regtested on aarch64-linux. gcc/ChangeLog: * config/aarch64/aarch64-opts.h (enum aarch64_ldp_policy): Removed. (enum aarch64_ldp_stp_policy): Merged enums aarch64_ldp_policy and aarch64_stp_policy to aarch64_ldp_stp_policy. (enum aarch64_stp_policy): Removed. * config/aarch64/aarch64-protos.h (struct tune_params): Removed aarch64_ldp_policy_model and aarch64_stp_policy_model enum types and left only the definitions to the aarch64-opts one. * config/aarch64/aarch64.cc (aarch64_parse_ldp_policy): Removed. (aarch64_parse_stp_policy): Removed. (aarch64_override_options_internal): Removed calls to parsing functions and added obvious direct assignments. (aarch64_mem_ok_with_ldpstp_policy_model): Improved code quality based on the new changes. * config/aarch64/aarch64.opt: Use single enum type aarch64_ldp_stp_policy for both ldp and stp options. gcc/testsuite/ChangeLog: * gcc.target/aarch64/ldp_aligned.c: Splitted into this and ldp_unaligned. * gcc.target/aarch64/stp_aligned.c: Splitted into this and stp_unaligned. * gcc.target/aarch64/ldp_unaligned.c: New test. * gcc.target/aarch64/stp_unaligned.c: New test. Signed-off-by: Manos Anagnostakis --- gcc/config/aarch64/aarch64-opts.h | 26 ++- gcc/config/aarch64/aarch64-protos.h | 25 +-- gcc/config/aarch64/aarch64.cc | 160 +++++++----------- gcc/config/aarch64/aarch64.opt | 29 +--- .../gcc.target/aarch64/ldp_aligned.c | 28 --- .../gcc.target/aarch64/ldp_unaligned.c | 40 +++++ .../gcc.target/aarch64/stp_aligned.c | 25 --- .../gcc.target/aarch64/stp_unaligned.c | 37 ++++ 8 files changed, 155 insertions(+), 215 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/ldp_unaligned.c create mode 100644 gcc/testsuite/gcc.target/aarch64/stp_unaligned.c diff --git a/gcc/config/aarch64/aarch64-opts.h b/gcc/config/aarch64/aarch64-opts.h index db8348507a3..831e28ab52a 100644 --- a/gcc/config/aarch64/aarch64-opts.h +++ b/gcc/config/aarch64/aarch64-opts.h @@ -108,20 +108,18 @@ enum aarch64_key_type { AARCH64_KEY_B }; -/* Load pair policy type. */ -enum aarch64_ldp_policy { - LDP_POLICY_DEFAULT, - LDP_POLICY_ALWAYS, - LDP_POLICY_NEVER, - LDP_POLICY_ALIGNED -}; - -/* Store pair policy type. */ -enum aarch64_stp_policy { - STP_POLICY_DEFAULT, - STP_POLICY_ALWAYS, - STP_POLICY_NEVER, - STP_POLICY_ALIGNED +/* An enum specifying how to handle load and store pairs using + a fine-grained policy: + - LDP_STP_POLICY_DEFAULT: Use the policy defined in the tuning structure. + - LDP_STP_POLICY_ALIGNED: Emit ldp/stp if the source pointer is aligned + to at least double the alignment of the type. + - LDP_STP_POLICY_ALWAYS: Emit ldp/stp regardless of alignment. + - LDP_STP_POLICY_NEVER: Do not emit ldp/stp. */ +enum aarch64_ldp_stp_policy { + AARCH64_LDP_STP_POLICY_DEFAULT, + AARCH64_LDP_STP_POLICY_ALIGNED, + AARCH64_LDP_STP_POLICY_ALWAYS, + AARCH64_LDP_STP_POLICY_NEVER }; #endif diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 5c6802b4fe8..60a55f4bc19 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -568,30 +568,9 @@ struct tune_params /* Place prefetch struct pointer at the end to enable type checking errors when tune_params misses elements (e.g., from erroneous merges). */ const struct cpu_prefetch_tune *prefetch; -/* An enum specifying how to handle load pairs using a fine-grained policy: - - LDP_POLICY_ALIGNED: Emit ldp if the source pointer is aligned - to at least double the alignment of the type. - - LDP_POLICY_ALWAYS: Emit ldp regardless of alignment. - - LDP_POLICY_NEVER: Do not emit ldp. */ - enum aarch64_ldp_policy_model - { - LDP_POLICY_ALIGNED, - LDP_POLICY_ALWAYS, - LDP_POLICY_NEVER - } ldp_policy_model; -/* An enum specifying how to handle store pairs using a fine-grained policy: - - STP_POLICY_ALIGNED: Emit stp if the source pointer is aligned - to at least double the alignment of the type. - - STP_POLICY_ALWAYS: Emit stp regardless of alignment. - - STP_POLICY_NEVER: Do not emit stp. */ - - enum aarch64_stp_policy_model - { - STP_POLICY_ALIGNED, - STP_POLICY_ALWAYS, - STP_POLICY_NEVER - } stp_policy_model; + /* Define models for the aarch64_ldp_stp_policy. */ + enum aarch64_ldp_stp_policy ldp_policy_model, stp_policy_model; }; /* Classifies an address. diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index aa920fc703a..dcded70c981 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -1358,8 +1358,8 @@ static const struct tune_params generic_tunings = have at most a very minor effect on SVE2 cores. */ (AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params cortexa35_tunings = @@ -1394,8 +1394,8 @@ static const struct tune_params cortexa35_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params cortexa53_tunings = @@ -1430,8 +1430,8 @@ static const struct tune_params cortexa53_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params cortexa57_tunings = @@ -1466,8 +1466,8 @@ static const struct tune_params cortexa57_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_RENAME_FMA_REGS), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params cortexa72_tunings = @@ -1502,8 +1502,8 @@ static const struct tune_params cortexa72_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params cortexa73_tunings = @@ -1538,12 +1538,10 @@ static const struct tune_params cortexa73_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; - - static const struct tune_params exynosm1_tunings = { &exynosm1_extra_costs, @@ -1575,8 +1573,8 @@ static const struct tune_params exynosm1_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &exynosm1_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params thunderxt88_tunings = @@ -1610,8 +1608,8 @@ static const struct tune_params thunderxt88_tunings = tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &thunderxt88_prefetch_tune, - tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */ }; static const struct tune_params thunderx_tunings = @@ -1645,8 +1643,8 @@ static const struct tune_params thunderx_tunings = tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND), /* tune_flags. */ &thunderx_prefetch_tune, - tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */ }; static const struct tune_params tsv110_tunings = @@ -1681,8 +1679,8 @@ static const struct tune_params tsv110_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &tsv110_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params xgene1_tunings = @@ -1716,8 +1714,8 @@ static const struct tune_params xgene1_tunings = tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS), /* tune_flags. */ &xgene1_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params emag_tunings = @@ -1751,8 +1749,8 @@ static const struct tune_params emag_tunings = tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS), /* tune_flags. */ &xgene1_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params qdf24xx_tunings = @@ -1787,8 +1785,8 @@ static const struct tune_params qdf24xx_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS, /* tune_flags. */ &qdf24xx_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; /* Tuning structure for the Qualcomm Saphira core. Default to falkor values @@ -1825,8 +1823,8 @@ static const struct tune_params saphira_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params thunderx2t99_tunings = @@ -1861,8 +1859,8 @@ static const struct tune_params thunderx2t99_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &thunderx2t99_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params thunderx3t110_tunings = @@ -1897,8 +1895,8 @@ static const struct tune_params thunderx3t110_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &thunderx3t110_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params neoversen1_tunings = @@ -1932,8 +1930,8 @@ static const struct tune_params neoversen1_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params ampere1_tunings = @@ -1971,8 +1969,8 @@ static const struct tune_params ampere1_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &ere1_prefetch_tune, - tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */ }; static const struct tune_params ampere1a_tunings = @@ -2011,8 +2009,8 @@ static const struct tune_params ampere1a_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &ere1_prefetch_tune, - tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */ }; static const advsimd_vec_cost neoversev1_advsimd_vector_cost = @@ -2194,8 +2192,8 @@ static const struct tune_params neoversev1_tunings = | AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT | AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const sve_vec_cost neoverse512tvb_sve_vector_cost = @@ -2333,8 +2331,8 @@ static const struct tune_params neoverse512tvb_tunings = | AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS | AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const advsimd_vec_cost neoversen2_advsimd_vector_cost = @@ -2525,8 +2523,8 @@ static const struct tune_params neoversen2_tunings = | AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS | AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const advsimd_vec_cost neoversev2_advsimd_vector_cost = @@ -2717,8 +2715,8 @@ static const struct tune_params neoversev2_tunings = | AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS | AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT), /* tune_flags. */ &generic_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; static const struct tune_params a64fx_tunings = @@ -2752,8 +2750,8 @@ static const struct tune_params a64fx_tunings = tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */ &a64fx_prefetch_tune, - tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */ - tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ + AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ }; /* Support for fine-grained override of the tuning structures. */ @@ -17866,36 +17864,6 @@ aarch64_parse_tune (const char *to_parse, const struct processor **res) return AARCH_PARSE_INVALID_ARG; } -/* Parse a command-line -param=aarch64-ldp-policy= parameter. VALUE is - the value of the parameter. */ - -static void -aarch64_parse_ldp_policy (enum aarch64_ldp_policy value, - struct tune_params* tune) -{ - if (value == LDP_POLICY_ALWAYS) - tune->ldp_policy_model = tune_params::LDP_POLICY_ALWAYS; - else if (value == LDP_POLICY_NEVER) - tune->ldp_policy_model = tune_params::LDP_POLICY_NEVER; - else if (value == LDP_POLICY_ALIGNED) - tune->ldp_policy_model = tune_params::LDP_POLICY_ALIGNED; -} - -/* Parse a command-line -param=aarch64-stp-policy= parameter. VALUE is - the value of the parameter. */ - -static void -aarch64_parse_stp_policy (enum aarch64_stp_policy value, - struct tune_params* tune) -{ - if (value == STP_POLICY_ALWAYS) - tune->stp_policy_model = tune_params::STP_POLICY_ALWAYS; - else if (value == STP_POLICY_NEVER) - tune->stp_policy_model = tune_params::STP_POLICY_NEVER; - else if (value == STP_POLICY_ALIGNED) - tune->stp_policy_model = tune_params::STP_POLICY_ALIGNED; -} - /* Parse TOKEN, which has length LENGTH to see if it is an option described in FLAG. If it is, return the index bit for that fusion type. If not, error (printing OPTION_NAME) and return zero. */ @@ -18245,12 +18213,10 @@ aarch64_override_options_internal (struct gcc_options *opts) &aarch64_tune_params); if (opts->x_aarch64_ldp_policy_param) - aarch64_parse_ldp_policy (opts->x_aarch64_ldp_policy_param, - &aarch64_tune_params); + aarch64_tune_params.ldp_policy_model = opts->x_aarch64_ldp_policy_param; if (opts->x_aarch64_stp_policy_param) - aarch64_parse_stp_policy (opts->x_aarch64_stp_policy_param, - &aarch64_tune_params); + aarch64_tune_params.stp_policy_model = opts->x_aarch64_stp_policy_param; /* This target defaults to strict volatile bitfields. */ if (opts->x_flag_strict_volatile_bitfields < 0 && abi_version_at_least (2)) @@ -26551,30 +26517,18 @@ aarch64_mergeable_load_pair_p (machine_mode mode, rtx mem1, rtx mem2) bool aarch64_mem_ok_with_ldpstp_policy_model (rtx mem, bool load, machine_mode mode) { - /* If we have LDP_POLICY_NEVER, reject the load pair. */ - if (load - && aarch64_tune_params.ldp_policy_model == tune_params::LDP_POLICY_NEVER) - return false; + auto policy = (load + ? aarch64_tune_params.ldp_policy_model + : aarch64_tune_params.stp_policy_model); - /* If we have STP_POLICY_NEVER, reject the store pair. */ - if (!load - && aarch64_tune_params.stp_policy_model == tune_params::STP_POLICY_NEVER) + /* If we have AARCH64_LDP_STP_POLICY_NEVER, reject the load pair. */ + if (policy == AARCH64_LDP_STP_POLICY_NEVER) return false; - /* If we have LDP_POLICY_ALIGNED, + /* If we have AARCH64_LDP_STP_POLICY_ALIGNED, do not emit the load pair unless the alignment is checked to be at least double the alignment of the type. */ - if (load - && aarch64_tune_params.ldp_policy_model == tune_params::LDP_POLICY_ALIGNED - && !optimize_function_for_size_p (cfun) - && MEM_ALIGN (mem) < 2 * GET_MODE_ALIGNMENT (mode)) - return false; - - /* If we have STP_POLICY_ALIGNED, - do not emit the store pair unless the alignment is checked to be - at least double the alignment of the type. */ - if (!load - && aarch64_tune_params.stp_policy_model == tune_params::STP_POLICY_ALIGNED + if (policy == AARCH64_LDP_STP_POLICY_ALIGNED && !optimize_function_for_size_p (cfun) && MEM_ALIGN (mem) < 2 * GET_MODE_ALIGNMENT (mode)) return false; diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt index 2101c5a23c4..f5a518202a1 100644 --- a/gcc/config/aarch64/aarch64.opt +++ b/gcc/config/aarch64/aarch64.opt @@ -339,39 +339,24 @@ Target Joined UInteger Var(aarch64_vect_unroll_limit) Init(4) Param Limit how much the autovectorizer may unroll a loop. -param=aarch64-ldp-policy= -Target Joined Var(aarch64_ldp_policy_param) Enum(aarch64_ldp_policy) Init(LDP_POLICY_DEFAULT) Param +Target Joined Var(aarch64_ldp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param --param=aarch64-ldp-policy=[default|always|never|aligned] Fine-grained policy for load pairs. -Enum -Name(aarch64_ldp_policy) Type(enum aarch64_ldp_policy) UnknownError(unknown aarch64_ldp_policy mode %qs) - -EnumValue -Enum(aarch64_ldp_policy) String(default) Value(LDP_POLICY_DEFAULT) - -EnumValue -Enum(aarch64_ldp_policy) String(always) Value(LDP_POLICY_ALWAYS) - -EnumValue -Enum(aarch64_ldp_policy) String(never) Value(LDP_POLICY_NEVER) - -EnumValue -Enum(aarch64_ldp_policy) String(aligned) Value(LDP_POLICY_ALIGNED) - -param=aarch64-stp-policy= -Target Joined Var(aarch64_stp_policy_param) Enum(aarch64_stp_policy) Init(STP_POLICY_DEFAULT) Param +Target Joined Var(aarch64_stp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param --param=aarch64-stp-policy=[default|always|never|aligned] Fine-grained policy for store pairs. Enum -Name(aarch64_stp_policy) Type(enum aarch64_stp_policy) UnknownError(unknown aarch64_stp_policy mode %qs) +Name(aarch64_ldp_stp_policy) Type(enum aarch64_ldp_stp_policy) UnknownError(unknown LDP/STP policy %qs) EnumValue -Enum(aarch64_stp_policy) String(default) Value(STP_POLICY_DEFAULT) +Enum(aarch64_ldp_stp_policy) String(default) Value(AARCH64_LDP_STP_POLICY_DEFAULT) EnumValue -Enum(aarch64_stp_policy) String(always) Value(STP_POLICY_ALWAYS) +Enum(aarch64_ldp_stp_policy) String(always) Value(AARCH64_LDP_STP_POLICY_ALWAYS) EnumValue -Enum(aarch64_stp_policy) String(never) Value(STP_POLICY_NEVER) +Enum(aarch64_ldp_stp_policy) String(never) Value(AARCH64_LDP_STP_POLICY_NEVER) EnumValue -Enum(aarch64_stp_policy) String(aligned) Value(STP_POLICY_ALIGNED) +Enum(aarch64_ldp_stp_policy) String(aligned) Value(AARCH64_LDP_STP_POLICY_ALIGNED) diff --git a/gcc/testsuite/gcc.target/aarch64/ldp_aligned.c b/gcc/testsuite/gcc.target/aarch64/ldp_aligned.c index f44f9616366..75495d71df2 100644 --- a/gcc/testsuite/gcc.target/aarch64/ldp_aligned.c +++ b/gcc/testsuite/gcc.target/aarch64/ldp_aligned.c @@ -14,16 +14,6 @@ TYPE ldp_aligned_##TYPE(char* ptr){ \ return a_0 + a_1; \ } -#define LDP_TEST_UNALIGNED(TYPE) \ -TYPE ldp_unaligned_##TYPE(char* ptr){ \ - TYPE a_0, a_1; \ - TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ - TYPE *a = arr+1; \ - a_0 = a[0]; \ - a_1 = a[1]; \ - return a_0 + a_1; \ -} - #define LDP_TEST_ADJUST_ALIGNED(TYPE) \ TYPE ldp_aligned_adjust_##TYPE(char* ptr){ \ TYPE a_0, a_1, a_2, a_3, a_4; \ @@ -36,29 +26,11 @@ TYPE ldp_aligned_adjust_##TYPE(char* ptr){ \ return a_0 + a_1 + a_2 + a_3 + a_4; \ } -#define LDP_TEST_ADJUST_UNALIGNED(TYPE) \ -TYPE ldp_unaligned_adjust_##TYPE(char* ptr){ \ - TYPE a_0, a_1, a_2, a_3, a_4; \ - TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ - TYPE *a = arr+1; \ - a_0 = a[100]; \ - a_1 = a[101]; \ - a_2 = a[102]; \ - a_3 = a[103]; \ - a_4 = a[110]; \ - return a_0 + a_1 + a_2 + a_3 + a_4; \ -} - LDP_TEST_ALIGNED(int32_t); LDP_TEST_ALIGNED(int64_t); LDP_TEST_ALIGNED(v4si); -LDP_TEST_UNALIGNED(int32_t); -LDP_TEST_UNALIGNED(int64_t); -LDP_TEST_UNALIGNED(v4si); LDP_TEST_ADJUST_ALIGNED(int32_t); LDP_TEST_ADJUST_ALIGNED(int64_t); -LDP_TEST_ADJUST_UNALIGNED(int32_t); -LDP_TEST_ADJUST_UNALIGNED(int64_t); /* { dg-final { scan-assembler-times "ldp\tw\[0-9\]+, w\[0-9\]" 3 } } */ /* { dg-final { scan-assembler-times "ldp\tx\[0-9\]+, x\[0-9\]" 3 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/ldp_unaligned.c b/gcc/testsuite/gcc.target/aarch64/ldp_unaligned.c new file mode 100644 index 00000000000..d9dcfe432f0 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/ldp_unaligned.c @@ -0,0 +1,40 @@ +/* { dg-options "-O2 --param=aarch64-ldp-policy=aligned -mcpu=generic" } */ + +#include +#include + +typedef int v4si __attribute__ ((vector_size (16))); + +#define LDP_TEST_UNALIGNED(TYPE) \ +TYPE ldp_unaligned_##TYPE(char* ptr){ \ + TYPE a_0, a_1; \ + TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ + TYPE *a = arr+1; \ + a_0 = a[0]; \ + a_1 = a[1]; \ + return a_0 + a_1; \ +} + +#define LDP_TEST_ADJUST_UNALIGNED(TYPE) \ +TYPE ldp_unaligned_adjust_##TYPE(char* ptr){ \ + TYPE a_0, a_1, a_2, a_3, a_4; \ + TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ + TYPE *a = arr+1; \ + a_0 = a[100]; \ + a_1 = a[101]; \ + a_2 = a[102]; \ + a_3 = a[103]; \ + a_4 = a[110]; \ + return a_0 + a_1 + a_2 + a_3 + a_4; \ +} + +LDP_TEST_UNALIGNED(int32_t); +LDP_TEST_UNALIGNED(int64_t); +LDP_TEST_UNALIGNED(v4si); +LDP_TEST_ADJUST_UNALIGNED(int32_t); +LDP_TEST_ADJUST_UNALIGNED(int64_t); + +/* { dg-final { scan-assembler-times "ldp\tw\[0-9\]+, w\[0-9\]" 0 } } */ +/* { dg-final { scan-assembler-times "ldp\tx\[0-9\]+, x\[0-9\]" 0 } } */ +/* { dg-final { scan-assembler-times "ldp\tq\[0-9\]+, q\[0-9\]" 0 } } */ + diff --git a/gcc/testsuite/gcc.target/aarch64/stp_aligned.c b/gcc/testsuite/gcc.target/aarch64/stp_aligned.c index ab9c2f42dd3..20bd95373fa 100644 --- a/gcc/testsuite/gcc.target/aarch64/stp_aligned.c +++ b/gcc/testsuite/gcc.target/aarch64/stp_aligned.c @@ -13,15 +13,6 @@ TYPE *stp_aligned_##TYPE(char* ptr, TYPE x){ \ return arr; \ } -#define STP_TEST_UNALIGNED(TYPE) \ -TYPE *stp_unaligned_##TYPE(char* ptr, TYPE x){ \ - TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ - TYPE *a = arr+1; \ - a[0] = x; \ - a[1] = x; \ - return a; \ -} - #define STP_TEST_ADJUST_ALIGNED(TYPE) \ TYPE *stp_aligned_adjust_##TYPE(char* ptr, TYPE x){ \ TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ @@ -32,27 +23,11 @@ TYPE *stp_aligned_adjust_##TYPE(char* ptr, TYPE x){ \ return arr; \ } -#define STP_TEST_ADJUST_UNALIGNED(TYPE) \ -TYPE *stp_unaligned_adjust_##TYPE(char* ptr, TYPE x){ \ - TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ - TYPE *a = arr+1; \ - a[100] = x; \ - a[101] = x; \ - a[102] = x; \ - a[103] = x; \ - return a; \ -} - STP_TEST_ALIGNED(int32_t); STP_TEST_ALIGNED(int64_t); STP_TEST_ALIGNED(v4si); -STP_TEST_UNALIGNED(int32_t); -STP_TEST_UNALIGNED(int64_t); -STP_TEST_UNALIGNED(v4si); STP_TEST_ADJUST_ALIGNED(int32_t); STP_TEST_ADJUST_ALIGNED(int64_t); -STP_TEST_ADJUST_UNALIGNED(int32_t); -STP_TEST_ADJUST_UNALIGNED(int64_t); /* { dg-final { scan-assembler-times "stp\tw\[0-9\]+, w\[0-9\]" 3 } } */ /* { dg-final { scan-assembler-times "stp\tx\[0-9\]+, x\[0-9\]" 3 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/stp_unaligned.c b/gcc/testsuite/gcc.target/aarch64/stp_unaligned.c new file mode 100644 index 00000000000..9a5690af362 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/stp_unaligned.c @@ -0,0 +1,37 @@ +/* { dg-options "-O2 --param=aarch64-stp-policy=aligned -mcpu=generic" } */ + +#include +#include + +typedef int v4si __attribute__ ((vector_size (16))); + +#define STP_TEST_UNALIGNED(TYPE) \ +TYPE *stp_unaligned_##TYPE(char* ptr, TYPE x){ \ + TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ + TYPE *a = arr+1; \ + a[0] = x; \ + a[1] = x; \ + return a; \ +} + +#define STP_TEST_ADJUST_UNALIGNED(TYPE) \ +TYPE *stp_unaligned_adjust_##TYPE(char* ptr, TYPE x){ \ + TYPE *arr = (TYPE*) ((uintptr_t)ptr & ~(2 * 8 * _Alignof(TYPE) - 1)); \ + TYPE *a = arr+1; \ + a[100] = x; \ + a[101] = x; \ + a[102] = x; \ + a[103] = x; \ + return a; \ +} + +STP_TEST_UNALIGNED(int32_t); +STP_TEST_UNALIGNED(int64_t); +STP_TEST_UNALIGNED(v4si); +STP_TEST_ADJUST_UNALIGNED(int32_t); +STP_TEST_ADJUST_UNALIGNED(int64_t); + +/* { dg-final { scan-assembler-times "stp\tw\[0-9\]+, w\[0-9\]" 0 } } */ +/* { dg-final { scan-assembler-times "stp\tx\[0-9\]+, x\[0-9\]" 0 } } */ +/* { dg-final { scan-assembler-times "stp\tq\[0-9\]+, q\[0-9\]" 0 } } */ +