[NFCI] InstructionTest: trim `InstructionsTest.ShuffleMaskIsReplicationMask_*` complexity

These tests have pretty high O() complexity due to their nature,
which leads to potentially-long runtimes.

While in release build for me they took ~1 and ~2 sec,
as noted in https://reviews.llvm.org/D113214#inline-1080479
they take minutes in debug build.

Fine-tune the amount of permutations they deal with,
without affecting the test coverage. After this,
they take <~10ms each for me (in release build),
hopefully that is good-enough for debug build too.
This commit is contained in:
Roman Lebedev 2021-11-05 19:22:27 +03:00
parent 3151fca9f3
commit 0b36431810
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 2 additions and 2 deletions

View File

@ -1131,7 +1131,7 @@ TEST(InstructionsTest, ShuffleMaskIsReplicationMask) {
}
TEST(InstructionsTest, ShuffleMaskIsReplicationMask_undef) {
for (int ReplicationFactor : seq_inclusive(1, 6)) {
for (int ReplicationFactor : seq_inclusive(1, 4)) {
for (int VF : seq_inclusive(1, 4)) {
const auto ReplicatedMask = createReplicatedMask(ReplicationFactor, VF);
int GuessedReplicationFactor = -1, GuessedVF = -1;
@ -1165,7 +1165,7 @@ TEST(InstructionsTest, ShuffleMaskIsReplicationMask_undef) {
}
TEST(InstructionsTest, ShuffleMaskIsReplicationMask_Exhaustive_Correctness) {
for (int ShufMaskNumElts : seq_inclusive(1, 8)) {
for (int ShufMaskNumElts : seq_inclusive(1, 6)) {
SmallVector<int> PossibleShufMaskElts;
PossibleShufMaskElts.reserve(ShufMaskNumElts + 2);
for (int PossibleShufMaskElt : seq_inclusive(-1, ShufMaskNumElts))