This is an archive of the discontinued LLVM Phabricator instance.

[CostModel][SVE] Add cost model for shuffle reverse with i1 and scalable vector
ClosedPublic

Authored by CarolineConcatto on Mar 2 2021, 1:36 AM.

Details

Summary

This patch adds the cost model for experimental.vector.reverse
with scalable vector types: nxv16i1, nxv8i1, nxv4i1 and nxv2i1.
These types are missing from the previous cost model patch D95603.

The cost model for experimental.vector.reverse with 1 bit mask is used by
loop vectorization in the patch D95363

Diff Detail

Event Timeline

CarolineConcatto requested review of this revision.Mar 2 2021, 1:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2021, 1:36 AM
CarolineConcatto retitled this revision from [AArch64] Add cost model for shuffle reverse with i1 and scalable vector to [CostModel][SVE] Add cost model for shuffle reverse with i1 and scalable vector.Mar 2 2021, 1:38 AM
sdesmalen added inline comments.Mar 2 2021, 2:02 AM
llvm/test/Analysis/CostModel/AArch64/getIntrinsicInstrCost-vector-reverse.ll
50 ↗(On Diff #327385)

The operand is not scalable, so this mangling of the intrinsic is not correct.

llvm/test/Analysis/CostModel/AArch64/sve-getIntrinsicInstrCost-vector-reverse.ll
20 ↗(On Diff #327385)

Just an FYI that this file has been removed, so you'll to rebase it and put the changes in llvm/test/Analysis/CostModel/AArch64 /sve-intrinsics.ll.

  • update the llvm-ir test
  • rebase
  • return file getIntrinsicInstrCost-vector-reverse.ll with the i1 test
CarolineConcatto marked an inline comment as done.Mar 2 2021, 8:47 AM

Thank you Sander!
My mistake not update main. Thank you for pointing it out.
Now the test is based on the latest main repo.

llvm/test/Analysis/CostModel/AArch64/getIntrinsicInstrCost-vector-reverse.ll
50 ↗(On Diff #327385)

Thank you Sander.
It was a C&P mistake.

CarolineConcatto edited reviewers, added: fhahn; removed: Florian.Mar 3 2021, 12:33 AM
This revision is now accepted and ready to land.Mar 3 2021, 12:36 AM

Other than my comment on removing the fixed-width tests, the patch looks good to me.

llvm/test/Analysis/CostModel/AArch64/getIntrinsicInstrCost-vector-reverse.ll
53 ↗(On Diff #327471)

I now see your code-changes only relate to scalable vectors, so these fixed-width tests are not really covering any changes in your patch. I'd suggest just removing them.

This revision was landed with ongoing or failed builds.Mar 4 2021, 10:54 AM
This revision was automatically updated to reflect the committed changes.
CarolineConcatto marked an inline comment as done.