This is not ready for review yet.
It is meant mostly as an illustration to show how combining and replacing VPlan recipes might work. It sits on top of the cost model changes from D89322 as we need a way to cost the instruction in the vplan, not the instructions in the original loop.
The patch:
- Adds a adjustVPlanForVectorPatterns to transform VPlans to other vector patterns.
- Adds tryCombineToMulh to match trunc(lsr(mul(ext, ext)), BW)) and convert it to a VPInstruction::vmulh node in the vplan graph.
- It adds some simple vp_ pattern matchers.
- Adds simple cost modelling for the new mulh vector instructions.
It passes the llvm lit tests, but I have run no further testing on it.