Skip to content

Commit 972fd20

Browse files
committed
[NVPTX] lower store v2f32 to st.b64
1 parent e0a812f commit 972fd20

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,10 +1440,14 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) {
14401440
MVT ScalarVT = SimpleVT.getScalarType();
14411441
unsigned ToTypeWidth = ScalarVT.getSizeInBits();
14421442
if (SimpleVT.isVector()) {
1443-
assert((Isv2x16VT(StoreVT) || StoreVT == MVT::v4i8) &&
1444-
"Unexpected vector type");
1445-
// v2x16 is stored using st.b32
1446-
ToTypeWidth = 32;
1443+
if (Isv2x16VT(StoreVT) || StoreVT == MVT::v4i8)
1444+
// v2x16 is stored using st.b32
1445+
ToTypeWidth = 32;
1446+
else if (StoreVT == MVT::v2f32)
1447+
// v2f32 is stored using st.b64
1448+
ToTypeWidth = 64;
1449+
else
1450+
llvm_unreachable("Unexpected vector type");
14471451
}
14481452

14491453
unsigned int ToType = getLdStRegType(ScalarVT);

0 commit comments

Comments
 (0)