From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0D27138582B2 for ; Thu, 22 Sep 2022 15:46:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0D27138582B2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663861567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tzPQksJHInWutiAS7nafongIsTvy/2Kb1B51GizwoQc=; b=PQOLYbqmWbVulAC2zJveyekXwBqccEEUK76hf9Sy2GboAIme9/NfaKE/E2CFaJaGS2vZOw Nn5Dd4CXRtxtTu6tBHdHszjYoea/xR+AFW+ImJO36XGxlSRGs03h6iFTn7wKaR9z9iWIjT /phZW5jTHTvxodBcSVlUpgRw2UlodDE= Received: from mail-oa1-f71.google.com (mail-oa1-f71.google.com [209.85.160.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-88-yRyJ9Q5XPFOD0qXWGnfeIg-1; Thu, 22 Sep 2022 11:46:07 -0400 X-MC-Unique: yRyJ9Q5XPFOD0qXWGnfeIg-1 Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-12777f2df6aso5222188fac.14 for ; Thu, 22 Sep 2022 08:46:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=tzPQksJHInWutiAS7nafongIsTvy/2Kb1B51GizwoQc=; b=GCN8U/9EnlLFCcluhpQ/M5Fpfk8xlyaHZKKa/kwRd+dmEj21FbGbIU1PP3QcvPpVvm dICdFny5yheMs1Jx04tb//RR74GDIsGwBEP1ZMRbXXRgcccef7ahEU3nB7kG6wkscz/M cXQbzutB/wzGPWiKhEfJHIm33gEctQ9xa9ib/ISFWHW8JSsjsL2/eAht5wJP6bZ2sTQD Clx48pGcO06V2kBNh+IEJcAT3NcFQ4jFd+ZXeC/DuvlV8xQzoFUuOQabraswyPdqy0wG +KDWe6/bzXNy5YttZclXauRTYG8bqU8UsU7T7UA+9Wram0+5jcDSw7+Qe9DqAvC0oaj+ Pp/w== X-Gm-Message-State: ACrzQf2vxivG0y1IuFckD0tSHTwH73EmK04FFLcVIdSXtZXPdG3l1F2b bE3RpYQmtxp8G+eMvuPJzptxJ2/5xmTNbFLNYTW3LSPR8+0gla+5NCOshOWZMpaEXnghuPhoq10 5khicnwP/xo6xzuyLxI/uZ1U/MzJfyR/TRA== X-Received: by 2002:a05:6808:650:b0:34f:b81f:960 with SMTP id z16-20020a056808065000b0034fb81f0960mr6730851oih.36.1663861565437; Thu, 22 Sep 2022 08:46:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5CLBWaFIC1Vmv6whvW0wkENVefhDD5KgzkcdmUN6MoNtHoXezeKKvhLKeVc64ME1wkOvp6TaH6AHZSzGbeXoE= X-Received: by 2002:a05:6808:650:b0:34f:b81f:960 with SMTP id z16-20020a056808065000b0034fb81f0960mr6730836oih.36.1663861565246; Thu, 22 Sep 2022 08:46:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aldy Hernandez Date: Thu, 22 Sep 2022 17:45:53 +0200 Message-ID: Subject: Re: TYPE_{MIN/MAX}_VALUE for floats? To: Jakub Jelinek Cc: Richard Biener , gcc-patches , "MacLeod, Andrew" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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: On Thu, Sep 22, 2022 at 5:22 PM Jakub Jelinek wrote: > > On Thu, Sep 22, 2022 at 05:02:19PM +0200, Aldy Hernandez wrote: > > It has always irritated me that we don't have TYPE_MIN_VALUE and > > TYPE_MAX_VALUE for floats (and for pointers for that matter). This > > means, we have to recalculate it ad-nauseum in vrp_val_min and > > vrp_val_max. > > > > I know we have dconstinf and dconstninf for floats, which we can just > > wrap around a TREE_REAL_CST, but it still seems like we should be more > > consistent here. If we know the endpoint for a type, we should cache > > it in it. > > This looks problematic. > While for !MODE_HAS_INFINITIES there are clear values, otherwise > the flag_finite_math_only flag has Optimization keyword, so it can change > between different functions, while a type is a global entity that can be > used by both __attribute__((optimize ("Ofast"))) and standard floating point > functions. Oh...it can have different values in different functions? Yeah, that's not gonna work. Oh well, thanks. Aldy