[PATCH] D159219: [RISCV] Cost illegally typed insert/extract elements correctly

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 12:09:19 PDT 2023


reames abandoned this revision.
reames added a comment.

Abandoning this.  Looks like I never updated this previously, so let me explain why.

I'd thought this patch was going to be straight forward, but applying it to x264 showed regressions on several key routines.  When looking into it, I stumbled into the non-linearity issue with build and explode vectors.  That is now fixed (by falling back to the stack).  Given those fixes, the cost model here is wrong.  Specifically, the cost of the extracts and inserts end up being effective constant time when each lane is acted upon.  As such, the costs proposed by this patch no longer apply for build and explode vector idioms, which are the dominant usage of this API.

We probably should separate out a costing API for build and explode separately from the individual extract and insert instructions.  Maybe once that's done, we can come back and revisit this idea once it really only applies to non-build/explode usage of these instructions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159219/new/

https://reviews.llvm.org/D159219



More information about the llvm-commits mailing list