From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 691A8385840D for ; Fri, 4 Nov 2022 23:47:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 691A8385840D 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-pl1-x62b.google.com with SMTP id k7so6263029pll.6 for ; Fri, 04 Nov 2022 16:47:28 -0700 (PDT) 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=9Zp+R9nRuWG08hYrQx9bSYTK1d7Ev0CSz0iC529PgjA=; b=F76Du6HRobSPgP1pF8Il7g7smQq1aN9ZReCl3Y0ttRghOY19g9puYIO3QdpComoITe JXcvOnHzVkjgrIPHcW7x3BA742qKIdS3VmX8spDeBHp1PkN28phKM1EvyUJdcScQt1r7 hwN0Nj087s6yx2aMEgkYBvuQbn8a71pL0jKXAppW2bv2LyyMIxL7rogt8+YKLM6M9pPK 7CZmAGzY5x+M997Hiy2wcIxUFlJ0kZli1bFJ/GmsuV1rZvrU0tHnsi8rZ6OvDdRFR5+U x9DjSCMMiF0ORYV0HiYDLvYQBF5hs9VV2yTYkYl23VGOZ7HVIILIzGOY2mQP/ARCf18C CSNQ== 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=9Zp+R9nRuWG08hYrQx9bSYTK1d7Ev0CSz0iC529PgjA=; b=rLTKwqgMs2FGzYn0dP4YznN4lT47/oVTGOB+nkKM1aFErU2at9RSnLT9pMtoOBKiLN YX/Op/QXx8yUFDNlSo5o1AvLWTgDHc4InUhvRPOruudNtQOnOGPj/DezpAyaENycSEkj fXPAHZ7ndAXMowfxPem9qcodkWSXf9fL9U+9qcC080KHFzj5DBTXoI2KZHWqckvYv+3d 2341D+8w4x5srGG5daF02mPn849yTQjSmlUAKtkBu1Jy0J3UVfT3qhRlV8Fv1IVTdBCR i7YJFE+N2w/LbhjR+TFeIMLfqx0TCT4cn98FKy/xmuK9Ozg7Z51jR15T8CL3TDpED/vk kSHw== X-Gm-Message-State: ANoB5pkv92jBM3+dEF6FG5cNGHuG0kGYAOJp1xsBfRRr+FuHSxRw3zMm wZ5uA1PIlRN6g1dsEKLGXKc= X-Google-Smtp-Source: AA0mqf45v/kCINtXaCPbtWzlGhV/vRi9js/gpNMDnA5DppIibNpw34URv+h23Jdpd+gvkiFJxcKoSQ== X-Received: by 2002:a17:902:a40a:b0:188:71b1:8f0f with SMTP id p10-20020a170902a40a00b0018871b18f0fmr714568plq.112.1667605647209; Fri, 04 Nov 2022 16:47:27 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id k193-20020a6284ca000000b0056e8eb09d58sm163049pfd.170.2022.11.04.16.47.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Nov 2022 16:47:26 -0700 (PDT) Message-ID: Date: Fri, 4 Nov 2022 17:47:24 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: query about commit 666fdc46bc8489 ("RISC-V: Fix bad insn splits with paradoxical subregs") Content-Language: en-US To: Vineet Gupta , Jakub Jelinek Cc: gcc@gcc.gnu.org, Michael Collison References: <23ac9d02-c687-7680-493b-8ace1558a4cb@rivosinc.com> <2541e77f-f069-13d1-c08e-47f55677a596@gmail.com> <1202fdda-12b7-8e75-a327-9b7888d4af9d@rivosinc.com> From: Jeff Law In-Reply-To: <1202fdda-12b7-8e75-a327-9b7888d4af9d@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,BODY_8BITS,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 11/4/22 17:38, Vineet Gupta wrote: >> commit 666fdc46bc848984ee7d2906f2dfe10e1ee5d535 >> Author: Jim Wilson >> Date:   Sat Jun 30 21:52:01 2018 +0000 >> >>     RISC-V: Add patterns to convert AND mask to two shifts. >> >>             gcc/ >>             * config/riscv/predicates.md (p2m1_shift_operand): New. >>             (high_mask_shift_operand): New. > > Indeed Jim introduced the pattern with 666fdc46bc8, but the clobber > was added later in 36ec3f57d305 ("RISC-V: Fix bad insn splits with > paradoxical subregs"). He attributed this to Jakub, and with Jim not > being super active these days, I tried reaching out to this cc list. > > Sorry I pasted wrong sha-id in my orig msg, it needs to be 36ec3f57d305 I'd look at the testcases in that hash.  I bet you're going to find one where we have a paradoxical subreg destination.  We can't shift bits into the paradoxical part, then expect to safely shift them back in.  The semantics of a paradoxical subreg are that the bits outside the inner mode are don't cares.  Of course you *may* need to go back to a compiler a that point in time to see the problematical case. Jeff