[llvm] [TableGen][GISel] Learn to import patterns with physreg defs (PR #120343)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 5 20:39:23 PST 2025


arsenm wrote:

> @arsenm Could you take a look at the failing test? The change allows importing `S_CMP_*` patterns, and there is one test where this causes machine verifier errors on vgpr->sgpr copy (the argument of `S_CMP_*`). 


> IIUC this should be fixed by pass, 

Not in GlobalISel. SIFixSGPRCopies is a giant hack for the DAG, half the reason we want globalisel is to delete it. It's probably a regbankselect bug


> 
> ```
>   %43:vgpr_32 = IMAGE_SAMPLE_LZ_V1_V1_gfx12 %205:vgpr_32, %39.sub8_sub9_sub10_sub11_sub12_sub13_sub14_sub15:sgpr_512, %39.sub0_sub1_sub2_sub3:sgpr_512, 1, 1, 0, 0, 0, -1, 0, 0, 0, implicit $exec :: (dereferenceable load (s32), addrspace 8)
>   %224:sreg_32 = COPY killed %43:vgpr_32
>   nofpexcept S_CMP_EQ_F32 killed %224:sreg_32, 0, implicit-def $scc, implicit $mode
>   %46:sreg_32_xm0_xexec = COPY killed $scc
> ```

What was the pre-select MIR?

https://github.com/llvm/llvm-project/pull/120343


More information about the llvm-commits mailing list