[llvm] [AMDGPU] In instruction selector, allow copy from physical reg to s1 (PR #96157)

Jun Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 15:57:38 PDT 2024


jwanggit86 wrote:

In the new commit I created a separate function just to handle copy from physical reg to VCC. However, I'm not sure this is an improvement over the previous version. Modifying the existing `isVCC()` would be more messy. One particular problem is that the check could have 3 different results: (1) it's not a copy to VCC we are looking for (2) it's a valid phy to VCC copy (3) it's not a valid phy to VCC copy.

If the main concern about the previous version is that `getRegClassOrNull()` is called after the reg class is already obtained in `isVCC()`, then maybe we can add an additional parameter to `isVCC()` to return the reg class.

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


More information about the llvm-commits mailing list