[PATCH] D22456: [X86][SSE] Add cost model values for CTPOP of vectors
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 11:12:02 PDT 2016
spatel added inline comments.
================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:970-973
@@ -970,1 +969,6 @@
+ { ISD::BSWAP, MVT::v16i16, 1 },
+ { ISD::CTPOP, MVT::v4i64, 7 },
+ { ISD::CTPOP, MVT::v8i32, 11 },
+ { ISD::CTPOP, MVT::v16i16, 9 },
+ { ISD::CTPOP, MVT::v32i8, 6 }
};
----------------
Add a general comment to explain why we have these numbers? Also add a comment in LowerVectorCTPOP() that the TTI cost model should be updated if the algorithm changes.
================
Comment at: test/Transforms/SLPVectorizer/X86/ctpop.ll:3-5
@@ -5,1 +2,5 @@
+; RUN: opt < %s -mtriple=x86_64-unknown -basicaa -slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE2
+; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7 -basicaa -slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE42
+; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -basicaa -slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX1
+; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -basicaa -slp-vectorizer -S | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX2
----------------
Can use -mattr=sse4.2 / avx / avx2 instead of -mcpu?
Repository:
rL LLVM
https://reviews.llvm.org/D22456
More information about the llvm-commits
mailing list