[llvm] [AMDGPU] CodeGen for GFX12 8/16-bit SMEM loads (PR #77633)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 09:19:50 PST 2024
================
@@ -5894,6 +5894,56 @@ void SITargetLowering::ReplaceNodeResults(SDNode *N,
}
return;
}
+ case Intrinsic::amdgcn_s_buffer_load: {
+ // Lower llvm.amdgcn.s.buffer.load.(i8, u8) intrinsics. First, we generate
+ // s_buffer_load_u8 for signed and unsigned load instructions. Next, DAG
+ // combiner tries to merge the s_buffer_load_u8 with a sext instruction
+ // (performSignExtendInRegCombine()) and it replaces s_buffer_load_u8 with
+ // s_buffer_load_i8.
+ assert(Subtarget->hasScalarSubwordLoads() &&
----------------
jayfoad wrote:
It's a failure to legalize, not a failure to select, since here we're custom promoting the illegal result type i8. But OK, it's still better than an assertion failure. Done.
https://github.com/llvm/llvm-project/pull/77633
More information about the llvm-commits
mailing list