[PATCH] D127492: []X86][SLP] Basic test coverage for llvm.powi
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 10 06:02:20 PDT 2022
RKSimon added a reviewer: ABataev.
RKSimon added inline comments.
================
Comment at: llvm/test/Analysis/CostModel/X86/powi.ll:7
+
+define i32 @powi(i32 %arg) {
+; SSE-LABEL: 'powi'
----------------
Probably worth adding a couple of different methods here with different i32 power factors: non-constant, negative, odd, even. big (above the limit for powi -> mul expansion):
@powi_var
@powi_6
@powi_3
@powi_n3
@powi_16
================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/powi.ll:7
+
+define <2 x double> @buildvector_powi_2f64(<2 x double> %a) {
+; CHECK-LABEL: @buildvector_powi_2f64(
----------------
again - you're going to need tests with different powi factors - not just the factor = 6 case from https://github.com/llvm/llvm-project/issues/53887 - its probably satisfactory to have these tests use different factors (just make sure you rename them to state the factor)?
probably worth adding at least one 'negative test' with different powi factors to make sure it doesn't try to vectorize / crash / whatever
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127492/new/
https://reviews.llvm.org/D127492
More information about the llvm-commits
mailing list