[llvm] 7aeb41b - [NFCI] VectorCombine: add statistic for bitcast(shuf()) -> shuf(bitcast()) xform
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 13:13:43 PDT 2020
Author: Roman Lebedev
Date: 2020-06-12T23:10:53+03:00
New Revision: 7aeb41b3c8446e5f5df67a20cba3101d899da27e
URL: https://github.com/llvm/llvm-project/commit/7aeb41b3c8446e5f5df67a20cba3101d899da27e
DIFF: https://github.com/llvm/llvm-project/commit/7aeb41b3c8446e5f5df67a20cba3101d899da27e.diff
LOG: [NFCI] VectorCombine: add statistic for bitcast(shuf()) -> shuf(bitcast()) xform
Added:
Modified:
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index 01403636b2b6..d78a4e429033 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -35,6 +35,7 @@ using namespace llvm::PatternMatch;
#define DEBUG_TYPE "vector-combine"
STATISTIC(NumVecCmp, "Number of vector compares formed");
STATISTIC(NumVecBO, "Number of vector binops formed");
+STATISTIC(NumShufOfBitcast, "Number of shuffles moved after bitcast");
STATISTIC(NumScalarBO, "Number of scalar binops formed");
static cl::opt<bool> DisableVectorCombine(
@@ -302,6 +303,7 @@ static bool foldBitcastShuf(Instruction &I, const TargetTransformInfo &TTI) {
return false;
}
// bitcast (shuf V, MaskC) --> shuf (bitcast V), MaskC'
+ ++NumShufOfBitcast;
IRBuilder<> Builder(&I);
Value *CastV = Builder.CreateBitCast(V, DestTy);
Value *Shuf =
More information about the llvm-commits
mailing list