[llvm] [WIP][SLP] Allow external uses to exist as both an extract and a rematerialization during the pass (PR #211680)
Ryan Buchner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 23:25:45 PDT 2026
================
----------------
bababuck wrote:
There is a slight costing change that is part of this MR. Prior to the MR, we only chose re-materialization if it was more that `TTI::TCC_Basic` cheaper than extracting or where there are non-power of two number of extracts. This is done because:
```
// Keep original scalar if number of externally used instructions in
// the same entry is not power of 2. It may help to do some extra
// vectorization for now.
```
However, with this MR this isn't necessary, so we now choose to rematerialize if it is the same cost or cheaper.
See [here](https://github.com/llvm/llvm-project/pull/211680/changes#diff-e3b933e8c46156c0eaf7cbb67866b712f69a8484bc941d10acec9d4d17b9f061R20305-R20323), and this comment [here](https://github.com/llvm/llvm-project/pull/211680/changes#r3641839924).
https://github.com/llvm/llvm-project/pull/211680
More information about the llvm-commits
mailing list