[llvm] a0f9674 - [VectorCombine] give invalid index value a name; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 08:10:49 PDT 2020
Author: Sanjay Patel
Date: 2020-06-24T11:10:36-04:00
New Revision: a0f967418f9e9030168ba934164cca56dc550634
URL: https://github.com/llvm/llvm-project/commit/a0f967418f9e9030168ba934164cca56dc550634
DIFF: https://github.com/llvm/llvm-project/commit/a0f967418f9e9030168ba934164cca56dc550634.diff
LOG: [VectorCombine] give invalid index value a name; NFC
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 eb9ae1e15552..4affaed7bbdf 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -47,6 +47,8 @@ static cl::opt<bool> DisableBinopExtractShuffle(
"disable-binop-extract-shuffle", cl::init(false), cl::Hidden,
cl::desc("Disable binop extract to shuffle transforms"));
+static const unsigned InvalidIndex = std::numeric_limits<unsigned>::max();
+
class VectorCombine {
public:
VectorCombine(Function &F, const TargetTransformInfo &TTI,
@@ -293,7 +295,7 @@ bool VectorCombine::foldExtractExtract(Instruction &I) {
// probably becomes unnecessary.
auto *Ext0 = cast<ExtractElementInst>(I0);
auto *Ext1 = cast<ExtractElementInst>(I1);
- uint64_t InsertIndex = std::numeric_limits<uint64_t>::max();
+ uint64_t InsertIndex = InvalidIndex;
if (I.hasOneUse())
match(I.user_back(),
m_InsertElt(m_Value(), m_Value(), m_ConstantInt(InsertIndex)));
More information about the llvm-commits
mailing list