Skip to content

Commit d2c7cb0

Browse files
committed
[NVPTX] lower store v2f32 to st.b64
1 parent 5ae4cdd commit d2c7cb0

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
@@ -1426,10 +1426,14 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) {
14261426
MVT ScalarVT = SimpleVT.getScalarType();
14271427
unsigned ToTypeWidth = ScalarVT.getSizeInBits();
14281428
if (SimpleVT.isVector()) {
1429-
assert((Isv2x16VT(StoreVT) || StoreVT == MVT::v4i8) &&
1430-
"Unexpected vector type");
1431-
// v2x16 is stored using st.b32
1432-
ToTypeWidth = 32;
1429+
if (Isv2x16VT(StoreVT) || StoreVT == MVT::v4i8)
1430+
// v2x16 is stored using st.b32
1431+
ToTypeWidth = 32;
1432+
else if (StoreVT == MVT::v2f32)
1433+
// v2f32 is stored using st.b64
1434+
ToTypeWidth = 64;
1435+
else
1436+
llvm_unreachable("Unexpected vector type");
14331437
}
14341438

14351439
unsigned int ToType = getLdStRegType(ScalarVT);

0 commit comments

Comments
 (0)