[llvm] [NVPTX] support packed f32 instructions for sm_100+ (PR #126337)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 15:24:02 PDT 2025
================
@@ -1425,14 +1466,21 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) {
// Type Setting: toType + toTypeWidth
// - for integer type, always use 'u'
MVT ScalarVT = SimpleVT.getScalarType();
- unsigned ToTypeWidth = ScalarVT.getSizeInBits();
if (SimpleVT.isVector()) {
- assert((Isv2x16VT(StoreVT) || StoreVT == MVT::v4i8) &&
- "Unexpected vector type");
- // v2x16 is stored using st.b32
- ToTypeWidth = 32;
+ switch (StoreVT.getSimpleVT().SimpleTy) {
+ case MVT::v2f16:
+ case MVT::v2bf16:
+ case MVT::v2i16:
+ case MVT::v4i8:
+ case MVT::v2f32:
----------------
AlexMaclean wrote:
I'm seeing something like this in lots of place (`Isv2x16VT(VT) || VT == MVT::v4i8 || VT == MVT::v2f32`). Lets add a helper function in NVPTXUtilities.h and use that throughout.
https://github.com/llvm/llvm-project/pull/126337
More information about the llvm-commits
mailing list