llvm-project
270c5d9a - [AMDGPU] Prevent folding of FMAC into FMAAK with two literals (#217438)

Commit
46 days ago
[AMDGPU] Prevent folding of FMAC into FMAAK with two literals (#217438) Currently the `foldImmediate` function can fold FMAC into FMAAK with two literals causing a verifier failure: ``` *** Bad machine code: VOP2/VOP3 instruction uses more than one literal *** - function: fold_fmac_to_fmaak - basic block: %bb.0 (0x627ad4dd40d0) - instruction: %3:vgpr_16_lo128 = contract nofpexcept V_FMAAK_F16_t16 10526, killed %4:vgpr_16_lo128, 8478, implicit $mode, implicit $exec ``` This change checks if a newly formed FMAAK is valid, and in a case two literals are used it introduces a MOV to legalize the instruction.
Author
Parents
Loading