We were letting G_ANYEXT with a vcc register bank through, which was
incorrect and would select to an invalid copy. Fix this up like G_ZEXT
and G_SEXT. Also drop old code to fixup the non-boolean case in
RegBankSelect. We now have to perform that expansion during selection,
so there's no benefit to doing it during RegBankSelect.
Details
Diff Detail
Event Timeline
Looks OK but I'm a bit out of my depth so I'd prefer someone else to take a look too.
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp | ||
---|---|---|
2159 | This would be clearer folded into its only use on line 2180. | |
2205 | Typo "selcet". | |
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-anyext.mir | ||
25 | Only vgpr0 is live-in, but I guess this is harmless? | |
28 | Why do we get the extra copy? Is this just more cruft that should be cleaned up by a later pass? |
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-anyext.mir | ||
---|---|---|
28 | Since we told the generic infrastructure this needs to break into 2 32-bit pieces, it created new 32-bit registers for us which we use. We end up with a copy to use it. I think letting the generic code sometimes create the split is just more trouble than it's worth, so I'm considering ripping that out |
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-anyext.mir | ||
---|---|---|
28 | End to end, PeepholeOptimizer and/or the RegisterCoalescer can take care of the copy. However I do think the combiner passes in GlobalISel should start taking care of these. Right now there's plenty of code which tries to skip through trivial copies as if they don't exist |
This would be clearer folded into its only use on line 2180.