[PATCH] D102515: [CostModel] Return an invalid cost for memory ops with unsupported types
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 7 04:56:53 PDT 2021
sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.
LGTM, thanks @kmclaughlin
================
Comment at: llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp:577
+TEST_F(AArch64SelectionDAGTest, getTypeConversion_ScalarizeScalableEVT_nxv1f128) {
+ EVT VT = EVT::getVectorVT(Context, MVT::f128, 1, true);
+ EXPECT_EQ(getTypeAction(VT), TargetLoweringBase::TypeScalarizeScalableVector);
----------------
nit: `ElementCount::getScalable(1)` is a bit more readable.
================
Comment at: llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp:579
+ EXPECT_EQ(getTypeAction(VT), TargetLoweringBase::TypeScalarizeScalableVector);
+ ASSERT_FALSE(getTypeToTransformTo(VT).isScalableVector());
}
----------------
nit: It's better to test the result explicitly, i.e.:
EXPECT_EQ(getTypeToTransformTo(VT) == MVT::f128);
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102515/new/
https://reviews.llvm.org/D102515
More information about the llvm-commits
mailing list