[Patch?][RFC][RTL] clobber handling & buildin expansion - missing insn_invalid_p call [PR100418]

Andrew Stubbs ams@codesourcery.com
Wed Jun 2 08:31:35 GMT 2021


On 30/05/2021 19:51, Jeff Law wrote:
> 
> 
> On 5/5/2021 7:50 AM, Tobias Burnus wrote:
>> Hi Eric, hi all,
>>
>> currently, gcn (amdgcn-amdhsa) bootstrapping fails as Alexandre's
>> patch to __builtin_memset (applied yesterday) now does more expansions.
>>
>> The problem is [→ PR100418]
>>   (set(reg:DI)(plus:DI(reg:DI)(const_int)))  [= "adddi3"]
>> This fails with gcn as gcn has two clobbers for "adddi3" - and when
>>   expand_insn
>> is called, INSN_CODE == -1 via:
>>   icode = recog_memoized (insn);
>> alias
>>   INSN_CODE (insn) = recog (PATTERN (insn), insn, 0);
>> As the "int *pnum_clobber" argument is NULL (well, '0'), the
>> clobbers are not available - which causes the pattern fail.
[...]
> Was this issue on GCN fixed by Andrew/Jakub's change to use 
> force_operand rather than emit_move_insn?

Yes, that's what that patch fixed.

Tobias's patch would also fix the issue, and any future issues with a 
similar problem.

Andrew


More information about the Gcc-patches mailing list