For the testcase in PR87561 which has a loop nest iterating over a triangle the vectorizer should take the evolution of the inner loop niter in the outer loop into account for cost modeling and compute a cost model check for the outer loop also applying cost model versioning to the outer loop instead of the inner loop.
If implemented the awkward x86 cost model adjustments might not be neccessary.