const LLT v2s64 = LLT::fixed_vector(2, 64);
const LLT p0 = LLT::pointer(0, 32);
+ const LLT v2p0 = LLT::fixed_vector(2, p0);
const LLT v3p0 = LLT::fixed_vector(3, p0);
const LLT v4p0 = LLT::fixed_vector(4, p0);
EXPECT_ACTION(FewerElements, 0, s16,
LegalityQuery(G_ADD, {LLT::scalable_vector(8, 16)}));
}
+
+ // Test minScalarEltSameAsIf
+ {
+ LegalizerInfo LI;
+ auto &LegacyInfo = LI.getLegacyLegalizerInfo();
+
+ LI.getActionDefinitionsBuilder(G_SELECT).minScalarEltSameAsIf(
+ all(isVector(0), isVector(1)), 1, 0);
+ LegacyInfo.computeTables();
+ LLT p1 = LLT::pointer(1, 32);
+ LLT v2p1 = LLT::fixed_vector(2, p1);
+
+ EXPECT_ACTION(WidenScalar, 1, v2s32, LegalityQuery(G_SELECT, {v2p0, v2s1}));
+ EXPECT_ACTION(WidenScalar, 1, v2s32, LegalityQuery(G_SELECT, {v2p1, v2s1}));
+ }
}
TEST(LegalizerInfoTest, MMOAlignment) {