From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 0C6D63858D28 for ; Thu, 25 Nov 2021 10:38:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0C6D63858D28 Received: by mail-ed1-x531.google.com with SMTP id z5so23712009edd.3 for ; Thu, 25 Nov 2021 02:38:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XcM1mTg42sBHW32oCrhckQWzpr64vvW/phrEmKJBy2U=; b=cByEu2wlu6jupgOg+QZXwUGyK31eaz2eUY12mHroAYZlQhowbcKWzOwOTGuLKxwfnz FM+bqTu3EmliG73WO+db+Nuia3O9zl3wRgTkHTVXorAVNafjWzdYlDBxJGkWLAeSnBaO nJrXb9/N7ykya1aT9UCADTd1h2sdcqK3A05wwipdKErwULJtex3tuxb56CXsGku2SAhi SxaB+POf5rur/RhRN61UDw6ZyXHst+rRsnVbw5YiLDOXXYIg1HZRwnLHTL8HPZmNMduV WGYu7Bc+0aov0ZkLheCogdWuwU3+L3FP8dg/0Ei18WEO6i/TJssShhlz9/O5WXEmKlRp JEQw== X-Gm-Message-State: AOAM531Dx58XhLJXsbNBOcIEv536zOG71St8651A5L+hmZdw4+ulaFtW yQQ9su+I9Syx6I1je/LC2l5782cud3HMEWoS4ro= X-Google-Smtp-Source: ABdhPJyVmS2wMDe3OREGrEK8EhkIOdrEba+4rfC4IcvLgDQfC8pa++bWnZWCbwVGge3HTfkuqQ7hpKO2tD8/OScEUB4= X-Received: by 2002:a05:6402:50ca:: with SMTP id h10mr37530375edb.70.1637836702922; Thu, 25 Nov 2021 02:38:22 -0800 (PST) MIME-Version: 1.0 References: <20211125075932.72179-1-hongtao.liu@intel.com> In-Reply-To: <20211125075932.72179-1-hongtao.liu@intel.com> From: Richard Biener Date: Thu, 25 Nov 2021 11:38:12 +0100 Message-ID: Subject: Re: [PATCH] Fix typo in r12-5486. To: liuhongt Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2021 10:38:25 -0000 On Thu, Nov 25, 2021 at 9:00 AM liuhongt via Gcc-patches wrote: > > TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (@2)) supposed to check > integer type but not pointer type, so use second parameter instead. > > i.e. first parameter is VPTR, second parameter is I4. > > 582DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_4, > 583 "__atomic_fetch_or_4", > 584 BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) > > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,}. > Failed testcases in PR are verified. > Ok for trunk? OK. > gcc/ChangeLog: > > PR middle-end/103419 > * match.pd: Fix typo, use the type of second parameter, not > first one. > --- > gcc/match.pd | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/gcc/match.pd b/gcc/match.pd > index 5adcd6bd02c..09c7ce749dc 100644 > --- a/gcc/match.pd > +++ b/gcc/match.pd > @@ -4053,7 +4053,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > } > (if (ibit == ibit2 > && ibit >= 0 > - && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2)))))) > + && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0)))))) > > (match (nop_atomic_bit_test_and_p @0 @1 @3) > (bit_and (convert?@3 (SYNC_FETCH_OR_XOR_N @2 INTEGER_CST@0)) > @@ -4064,21 +4064,21 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > } > (if (ibit == ibit2 > && ibit >= 0 > - && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2)))))) > + && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0)))))) > > (match (nop_atomic_bit_test_and_p @0 @0 @4) > (bit_and:c > (convert1?@4 > (ATOMIC_FETCH_OR_XOR_N @2 (nop_convert? (lshift@0 integer_onep@5 @6)) @3)) > (convert2? @0)) > - (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2))))) > + (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0))))) > > (match (nop_atomic_bit_test_and_p @0 @0 @4) > (bit_and:c > (convert1?@4 > (SYNC_FETCH_OR_XOR_N @2 (nop_convert? (lshift@0 integer_onep@3 @5)))) > (convert2? @0)) > - (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2))))) > + (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0))))) > > (match (nop_atomic_bit_test_and_p @0 @1 @3) > (bit_and@4 (convert?@3 (ATOMIC_FETCH_AND_N @2 INTEGER_CST@0 @5)) > @@ -4090,7 +4090,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > } > (if (ibit == ibit2 > && ibit >= 0 > - && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2)))))) > + && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0)))))) > > (match (nop_atomic_bit_test_and_p @0 @1 @3) > (bit_and@4 > @@ -4103,21 +4103,21 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > } > (if (ibit == ibit2 > && ibit >= 0 > - && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2)))))) > + && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0)))))) > > (match (nop_atomic_bit_test_and_p @4 @0 @3) > (bit_and:c > (convert1?@3 > (ATOMIC_FETCH_AND_N @2 (nop_convert?@4 (bit_not (lshift@0 integer_onep@6 @7))) @5)) > (convert2? @0)) > - (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2))))) > + (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@4))))) > > (match (nop_atomic_bit_test_and_p @4 @0 @3) > (bit_and:c > (convert1?@3 > (SYNC_FETCH_AND_AND_N @2 (nop_convert?@4 (bit_not (lshift@0 integer_onep@6 @7))))) > (convert2? @0)) > - (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2))))) > + (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@4))))) > > #endif > > -- > 2.18.1 >