From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id B3C6B3856242 for ; Thu, 29 Sep 2022 10:44:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3C6B3856242 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 372A31063 for ; Thu, 29 Sep 2022 03:44:18 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 315393F73B for ; Thu, 29 Sep 2022 03:44:11 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [pushed] data-ref: Fix ranges_maybe_overlap_p test Date: Thu, 29 Sep 2022 11:44:09 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-45.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,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: dr_may_alias_p rightly used poly_int_tree_p to guard a use of ranges_maybe_overlap_p, but used the non-poly extractors. This caused a few failures in the SVE ACLE asm tests. Tested on aarch64-linux-gnu and x86_64-linux-gnu. Pushed as obvious. Richard gcc/ * tree-data-ref.cc (dr_may_alias_p): Use to_poly_widest instead of to_widest. --- gcc/tree-data-ref.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/tree-data-ref.cc b/gcc/tree-data-ref.cc index 91bfb619d66..978c3f002f7 100644 --- a/gcc/tree-data-ref.cc +++ b/gcc/tree-data-ref.cc @@ -2979,10 +2979,10 @@ dr_may_alias_p (const struct data_reference *a, const struct data_reference *b, && operand_equal_p (DR_OFFSET (a), DR_OFFSET (b)) && poly_int_tree_p (tree_size_a) && poly_int_tree_p (tree_size_b) - && !ranges_maybe_overlap_p (wi::to_widest (DR_INIT (a)), - wi::to_widest (tree_size_a), - wi::to_widest (DR_INIT (b)), - wi::to_widest (tree_size_b))) + && !ranges_maybe_overlap_p (wi::to_poly_widest (DR_INIT (a)), + wi::to_poly_widest (tree_size_a), + wi::to_poly_widest (DR_INIT (b)), + wi::to_poly_widest (tree_size_b))) { gcc_assert (integer_zerop (DR_STEP (a)) && integer_zerop (DR_STEP (b))); -- 2.25.1