From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 116BD3858D33 for ; Tue, 29 Nov 2022 08:26:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 116BD3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x134.google.com with SMTP id j4so21358188lfk.0 for ; Tue, 29 Nov 2022 00:26:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MJZBRU3uzxv3XbkhH1Tc4JW7IYyV1zPs3VRLiBOQT9c=; b=VFCvjAdyr/bkLR6QDCSgLgU+xyXHyiV2/H5OglLEUWUWP3awhnurUTswJ0om/VZPvN 8QJHn/mg6C4doudnbJ0DAEDIs8XRG4vmDbVeLyS/0SCWAE8sYO4EWA3lWV2adjVtusmg DKg6+pdQRGOMNPZzE2NGHpuuzCvx+rKjfl+c6Wst5wq9OWyWSUnwuMQJc84k+bdBD910 G8SHdRSpia/Tx3sf5Nqp6QF8B5XVWd5wjz2RyIAkQjtwJC0/L7AczzB3d6JIYRhk3m7e ZqyU3JWwLCbL/FSoqMKajn9hslg4EV+vcl5thPLiiBsLOWVTqWABiqhKw+aqF9qlTYxG 1AhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MJZBRU3uzxv3XbkhH1Tc4JW7IYyV1zPs3VRLiBOQT9c=; b=rR9yB0H1CXdlmQvmxqlA8ZVJjkocviO2xkRnt4XG3WpwYiEHSyRvCeaY3kKKtvdwLP PjTU29ZcrZxaIrKY9buS117RgAbeYrbJUJ/GmdBaMma0NWelr96+qAEx3C0Ti9tcA6oq RGkH0xSQpGoeD2aiLMBt4RoFu9MBEhIudl6xMfFkJZGwV6yeD3CX/dgkrZxJDEA9cq9s QWkzs6iHG6rSW1XsYYITjJxSNcpItgCSfEQ0W0btw7nkvFla+9JmW7mAKDHlkJy1ApVn ek3xQ/N1g8VCp0Z3CCiVFWRLxRSrgKejU+cx6XkvgN95D5ryrgHOt4WoDdqD1vIF4/mk I8/Q== X-Gm-Message-State: ANoB5ploHIrJLYOF90UOf8HrMldT4VOJcpkcDG66wja4srpBKCA6Kgn0 M3fHN1D+nm1bW5yvrmVmVhqWWkTS43CcmXB8uT4= X-Google-Smtp-Source: AA0mqf6Uj+POIlJOlUPlMtVRDnVKVOOpzaQREc4A94E5kxp3eRHAxkA0f3AKanHcFL0sxkzCO+VxCcIrGhl0i0Y/cQY= X-Received: by 2002:ac2:58d7:0:b0:4b4:fbce:606b with SMTP id u23-20020ac258d7000000b004b4fbce606bmr7121763lfo.27.1669710381405; Tue, 29 Nov 2022 00:26:21 -0800 (PST) MIME-Version: 1.0 References: <4a052a62-7861-ed6f-9801-3b58ac384f81@linux.ibm.com> <20221128175629.GO25951@gate.crashing.org> <2e763337-f343-b08d-0866-b8edc9908f7e@linux.ibm.com> In-Reply-To: <2e763337-f343-b08d-0866-b8edc9908f7e@linux.ibm.com> From: Richard Biener Date: Tue, 29 Nov 2022 09:26:08 +0100 Message-ID: Subject: Re: Ping [PATCH] Change the behavior of predicate check failure on cbranchcc4 operand0 in prepare_cmp_insn To: HAO CHEN GUI Cc: gcc-patches , David , Peter Bergner , "Kewen.Lin" , Segher Boessenkool Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On Tue, Nov 29, 2022 at 2:15 AM HAO CHEN GUI wrote: > > Hi Richard, > > =E5=9C=A8 2022/11/29 2:46, Richard Biener =E5=86=99=E9=81=93: > > Anyhow - my question still stands - what's the fallback for the callers > > that do not check for failure? How are we sure we're not running into > > these when relaxing the requirement that a MODE_CC prepare_cmp_insn > > must not fail? > > I examed the code and found that currently callers should be fine with > returning a NULL_RTX for MODE_CC processing. The prepare_cmp_insn is call= ed > by following callers. > > 1 gen_cond_trap which doesn't uses MODE_CC > 2 prepare_cmp_insn itself where is after MODE_CC processing, so it never > hits MODE_CC > 3 emit_cmp_and_jump_insns which doesn't uses MODE_CC > 4 emit_conditional_move which checks the output is null or not > 5 emit_conditional_add which checks the output is null or not Thanks for checking. > Not sure if I missed something. Looking forward to your advice. I'd then say the non-presence of the optab should be handled the same as a mismatching predicate as the other comment on the patch indicates. thanks, Richard. > Thanks a lot > Gui Haochen >