[VectorCombine] give invalid index value a name; NFC
authorSanjay Patel <spatel@rotateright.com>
Wed, 24 Jun 2020 14:11:18 +0000 (10:11 -0400)
committerSanjay Patel <spatel@rotateright.com>
Wed, 24 Jun 2020 15:10:36 +0000 (11:10 -0400)
llvm/lib/Transforms/Vectorize/VectorCombine.cpp

index eb9ae1e..4affaed 100644 (file)
@@ -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)));