This was replicating the low bits into the high bits, rather than
applying the appropriate extension type.
Details
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp | ||
---|---|---|
2315–2317 | Surely the src is always i1 here, so the high part of dst will always be 0 (or undef for anyext)? |
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp | ||
---|---|---|
2315–2317 | Not if it’s G_SEXT |
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp | ||
---|---|---|
2315–2317 | OK, but if it's G_ZEXT the high part is zero and if it's G_SEXT the high part is the same as the low part (and if it's G_ANYEXT the high part is undef). So in no case do you need either a shift or another select. |
Special case extend from s1 sext case. The zext case emits a constant 0, but I think this depends on whether it's using the CSEMIRbuilder or not. There's not much difference between copy of 0 or second copy of 0
Surely the src is always i1 here, so the high part of dst will always be 0 (or undef for anyext)?