From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 4753E385B830 for ; Thu, 3 Feb 2022 12:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4753E385B830 Received: by mail-wr1-x42e.google.com with SMTP id w11so4731373wra.4 for ; Thu, 03 Feb 2022 04:24:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ag46elGzd1S3YkuydD4zXp1KFxXg/DVc6UGdwG1a/cs=; b=N99Sqal777hK3trQia+o1/KKXJpdh7PrqOQbGWrr5WDwUcNpeMtfLqfA8a59Ec170z HoqxzGUjFoJnCTvknHCPN5DpS1vodulIuiKHZKL2mK3wncjO9ix8Bjkx126V2TNKHk4C IJKqg+PhWtjl0f9G6sQXUijwdiWb4KjtmlqxfdXvMm9vhPWYmx0NMm/ZbCDkM/3aDpEk owNB0WevOW2NZv/u7GEEXWhvKHpkPSxQ7fwqgLYx79te1OdlB9tjwosCoPclmqHvU3YS zuW/VRUob90kDd2h670AYKBG6XVA9kOU6hED4z5H3FVLP+Tx35LfB0Gj/A7CWN+UG+6N SDWg== X-Gm-Message-State: AOAM532ykRXWNFpGVVQUgR48eGicVkwQ+5/sdoNUOkL76wHiTsDtc56S 1OK9DCEZW7romuo93TPeYShTGQ== X-Google-Smtp-Source: ABdhPJxIwM6zO6XwtHMohnMDdbPeXVrnwG+GFjt/G+qypWUFePKWUujjzBeRYvJOj5hcpAEIIYjZkA== X-Received: by 2002:adf:a4da:: with SMTP id h26mr2677455wrb.179.1643891049280; Thu, 03 Feb 2022 04:24:09 -0800 (PST) Received: from fomalhaut.localnet ([2a01:e0a:41b:84f0:cf71:f5e0:b050:bede]) by smtp.gmail.com with ESMTPSA id f5sm19720082wrq.87.2022.02.03.04.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 04:24:08 -0800 (PST) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: Richard Biener Cc: Jakub Jelinek , gcc-patches@gcc.gnu.org, Zhao Wei Liew , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] match.pd: Fix up 1 / X for unsigned X optimization [PR104280] Date: Thu, 03 Feb 2022 13:24:08 +0100 Message-ID: <8022705.T7Z3S40VBb@fomalhaut> In-Reply-To: <12oonr96-382n-6s3-58so-o165n768228@fhfr.qr> References: <20220203111810.GL2646553@tucnak> <12oonr96-382n-6s3-58so-o165n768228@fhfr.qr> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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, 03 Feb 2022 12:24:12 -0000 > Yes, I think the intent is clear. The question is whether we should > re-instantiate the clear intent of preserving a literal / 0 as well > (for C, without -fnon-call-exceptions). Note that the code is precisely compiled with -fnon-call-exceptions: ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),) # Provide default flags for compiling divmod functions, if they haven't been # set already by a target-specific Makefile fragment. LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions endif # Build LIB2_DIVMOD_FUNCS. lib2-divmod-o = $(patsubst %,%$(objext),$(LIB2_DIVMOD_FUNCS)) $(lib2-divmod-o): %$(objext): $(srcdir)/libgcc2.c $(gcc_compile) -DL$* -c $< \ $(LIB2_DIVMOD_EXCEPTION_FLAGS) $(vis_hide) libgcc-objects += $(lib2-divmod-o) ifeq ($(enable_shared),yes) lib2-divmod-s-o = $(patsubst %,%_s$(objext),$(LIB2_DIVMOD_FUNCS)) $(lib2-divmod-s-o): %_s$(objext): $(srcdir)/libgcc2.c $(gcc_s_compile) -DL$* -c $< \ $(LIB2_DIVMOD_EXCEPTION_FLAGS) libgcc-s-objects += $(lib2-divmod-s-o) endif so it seems like we were about to reinvent the wheel here. ;-) -- Eric Botcazou