Subject: bug#46670: 28.0.50; [feature/native-comp] possible miscompilation affecting lsp-mode

From: Andrea Corallo <[email-masked]>
Date: Wed, 24 Feb 2021 09:42:39 +0000

Pip Cet <[email-masked]> writes:

> On Wed, Feb 24, 2021 at 9:04 AM Andrea Corallo <[email-masked]> wrote:
>> Pip Cet <[email-masked]> writes:
>>
>> > On Tue, Feb 23, 2021 at 11:36 PM Andrea Corallo <[email-masked]> wrote:
>> >> Pip Cet <[email-masked]> writes:
>> >> > Is this one of them, or am I confused?
>> >>
>> >> What's suspitions with that?  At present I'm admittedly quite done but
>> >> it looks okay to me.
>> >
>> > We're emitting
>> >
>> > (assume ,lhs (and ,lhs ,rhs))
>> >
>> > even when NEGATED is t.
>>
>> Nope, when NEGATED is t the complete sequence we are emitting is (see
>> line just following your diff hunk):
>>
>> (assume tmp-mvar (not rhs))
>
> But tmp-mvar is in the same slot as RHS.
>
>> (assume lhs (and lhs tmp-mvar))
>
> So this is equivalent (after the next SSA rename) to
>
> (assume lhs (and lhs rhs))

No sorry, after renaming this will be:

(assume rhs_2 (not rhs_1))
(assume lhs_2 (and lhs_1 rhs_2))

or if we prefer from an real dump:

(assume #(mvar 22593374 2 (not (integer 3 3))) (not #(mvar 22590962 2 (integer 3 3))))
(assume #(mvar 22593448 0 (or marker number)) (and #(mvar 22591258 0 (or marker number)) #(mvar 22593374 2 (not (integer 3 3)))))

Sorry my development time budget for this week has been almost entirely
consumed now, I'll try to come back on your many mails but I have other
duties in line.

  Andrea