This is an archive of the discontinued LLVM Phabricator instance.

[VPlan][WIP] VMULH via VPRecipeBase
Needs ReviewPublic

Authored by dmgreen on Sep 23 2020, 7:59 AM.

Details

Summary

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.

Diff Detail

Event Timeline

dmgreen created this revision.Sep 23 2020, 7:59 AM
Herald added a project: Restricted Project. · View Herald Transcript
dmgreen requested review of this revision.Sep 23 2020, 7:59 AM
dmgreen updated this revision to Diff 302208.Nov 1 2020, 11:08 PM
dmgreen edited the summary of this revision. (Show Details)

I rebase and have take out some of the VPValue/VPRecipe changes, leaving the basic idea for vmulh codegen here. Still not intended for review as many details have not been filled out.