[PATCH] D152001: [RISCV][SLP] Inflate insert/extract costs on very small vectors
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 08:42:18 PDT 2023
reames added inline comments.
================
Comment at: llvm/test/Transforms/SLPVectorizer/RISCV/math-function.ll:203
-; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <2 x i32> <i32 2, i32 3>
-; CHECK-NEXT: [[TMP4:%.*]] = call fast <2 x float> @llvm.exp.v2f32(<2 x float> [[TMP3]])
-; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x float> [[TMP4]], <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
----------------
For a bit of context since this confused me at first.
We don't actually have a vector lowering for exp. As a result, @llvm.exp.v2f32 is getting scalarized by the backend, and the cost model knows this. This is why this change to extract/insert element is seemingly effecting extract subvector costs. It isn't; it's, correctly, effecting the perceived cost of the vector exp op.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152001/new/
https://reviews.llvm.org/D152001
More information about the llvm-commits
mailing list