Subject: bug#74771: Native compilation bug with struct predicates when lexical binding enabled (HEAD)

From: Pip Cet <[email-masked]>
Date: Wed, 11 Dec 2024 14:01:13 +0000

"Eli Zaretskii" <[email-masked]> writes:

>> Cc: [email-masked]
>> Date: Tue, 10 Dec 2024 22:12:03 +0000
>> From:  Pip Cet via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>>
>> Pip Cet <[email-masked]> writes:
>>
>> > IIUC, the code blindly assumes that cond-jump would use t as its second
>> > argument.  In your code, the second argument was nil, so the assumptions
>> > were put into the wrong basic blocks.
>>
>> I did not understand correctly.  It seems cond-jump is still limited to
>> a nil second argument, which is an undocumented assumption that comp.el
>> continues to rely on.
>>
>> I still think comp--emit-assume does the wrong thing when negating an
>> assumption, but we've been there before...
>
> Let's hear from Andrea (CC'ed) about this.

You're right. I have a new theory, but as it boils down to something
that has been discussed before (whether "assume" pseudo-insns apply to
individual mvars or to all mvars sharing a slot - my understanding is it
has to be the latter, so we end up making invalid assumptions about the
new mvar in the slot based on things we know about the old, clobbered
mvar), it's best to let Andrea handle this one.  I'll just disable
nativecomp assume pseudo-insns for my builds as I don't want to run into
this bug.

Pip