From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 2C7E93858D35 for ; Tue, 27 Dec 2022 17:38:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2C7E93858D35 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-io1-xd33.google.com with SMTP id n63so7189799iod.7 for ; Tue, 27 Dec 2022 09:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=f8eX7poUGZTm+FstT2kwOxcyt1hWaB9Q7a1ZHaQai2Q=; b=qJqK/S71+4G0f5DYDfyAgL/hpEN2NDvhF4tj+c4zZZzUEL6xZBUQ6mN3TkNThCiYtt bW3iy0XGokiLDghxmA8uJOmWEm0nkEt6H5bkHAVxwjmx/NMH0w21AdwhXI3pOeRM5Yjq I3ooniHvPn8ilMzavIWzRqFh31hvMocrXrCAByx2aUxBUOsD3Q/qg0sZKmv8lGIDpWNE nix561PLUzJt99a1FePmwI3lWjA2/fUfVLnULFLzLhr6JwK0p2jilIJfgV2nNNHE3/F0 ci025q9dzWGYxRBVKPQwEad+Jlaxf+p+5UiHYYwRkVayWQ59fP6colbh5iuocF5Breka FCcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f8eX7poUGZTm+FstT2kwOxcyt1hWaB9Q7a1ZHaQai2Q=; b=zbktB1T8IqOnHISetJ1w8cvEDqtfuW/Kc5duOBsOdZc1neuxUGsrth7ipEqgqMgSxk Ags4SE3f28nxBK0mHDnaZSOFh/PHyufUoN5kLmGLJjOj8riU4TRHYVUmLUV+URdzRt2P h1/gQ+loTwhGD4YaL/Mu9rk0Fmt6ujy1nOvEYIUhwCUc8AGY5ju4ipYXsr1pjRBkKdaQ NBJ+ivigLuspWrcK8vBCIJ5PUvsLJfpMgj7s/3ag4T8v0LVDPIS5Igs5p7PH4vo0yt7N a+n20n26w/xajHXwklZPvfHWCHCjzV/28YZ7CnkV73Rkl4/svxSWI9a4+pUOb75j5qFM 8ADQ== X-Gm-Message-State: AFqh2kq7YMOnb5VIoha9SQDfksnlDov4Z0pA/2Q23ySWRWdKLXJYUX+7 fb9lk1KVnotegGBiQNxQOKI= X-Google-Smtp-Source: AMrXdXuEPMVCT8OdKRiLe6NKUJKd8sWHrfPzgl3/oHKN/qtZtCUgXhTCYE9K8Nn3U8XYg4kLxDDK8A== X-Received: by 2002:a5d:8155:0:b0:6e5:25a2:c63d with SMTP id f21-20020a5d8155000000b006e525a2c63dmr15009963ioo.21.1672162685198; Tue, 27 Dec 2022 09:38:05 -0800 (PST) Received: from [172.31.1.18] (65-130-81-249.slkc.qwest.net. [65.130.81.249]) by smtp.gmail.com with ESMTPSA id u20-20020a6be914000000b006dfa5af69f5sm5100337iof.0.2022.12.27.09.38.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Dec 2022 09:38:04 -0800 (PST) Message-ID: Date: Tue, 27 Dec 2022 10:38:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] strlen: do not use cond_expr for boundaries Content-Language: en-US To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , gcc-patches@gcc.gnu.org Cc: Martin Sebor References: <677e6b2b-5198-f2b2-d5e5-dc388b77bcb0@suse.cz> From: Jeff Law In-Reply-To: <677e6b2b-5198-f2b2-d5e5-dc388b77bcb0@suse.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 12/23/22 08:44, Martin Liška wrote: > Hi. > > We reach cond_expr and then we get an ICE in tree_int_cst_lt. > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > PR tree-optimization/108137 > > gcc/ChangeLog: > > * tree-ssa-strlen.cc (get_range_strlen_phi): Reject anything > different from INTEGER_CST. > > gcc/testsuite/ChangeLog: > > * gcc.dg/tree-ssa/pr108137.c: New test. OK. You could perhaps do better by looking at the arms of the COND_EXPR, but this seems like the safest thing to do for gcc-13. jeff