Andrea Pinski <[email protected]> writes:
> On Mon, Oct 12, 2026 at 1:47 AM <[email protected]> wrote:
>>
>> From: Dhruv Chawla <[email protected]>
>>
>> r17-4816-gb24418a2212866 gives a call whose result is discarded a
>> placeholder
>> lhs using create_tmp_var, which gives a VAR_DECL. This ends up setting
>> ssa_renaming_needed and the subsequent fold passes do not set
>> TODO_update_ssa,
>> so execute_todo ICEs. This is only set for register types and not for
>> aggregates, like svfloat32x2_t, which cannot be made via make_ssa_name
>> regardless. Thus, only generate the SSA name when is_gimple_reg_type is
>> true.
>>
>> This needs the fold to run after SSA construction. In the testcase the
>> second
>> operand is not yet a constant when intrinsics are first folded from
>> gimple-low, so the fold only succeeds once CCP has executed.
>>
>> Bootstrapped and regtested on aarch64-linux-gnu.
>>
>> Signed-off-by: Dhruv Chawla <[email protected]>
>>
>> gcc/ChangeLog:
>>
>>         PR target/127771
>>         * config/aarch64/aarch64-acle-builtins.cc: Include ssa.h.
>>         (gimple_folder::fold): Make an SSA name for the placeholder when
>>         is_gimple_reg_type and release it when unused.
>
> What about this alternative patch?  This should be less fragile though
> it requires some more changes than the current approach.
> I have not tested it either so there might be some typos.

FWIW, I've also got an idea for an alternative.  It's even more
invasive :) but again hopefully less fragile.  Hope to post it tomorrow.

Thanks,
Richard

Reply via email to