[SLP][NFC]Fix a warning for ?: with enum/unsigned, NFC.
authorAlexey Bataev <a.bataev@outlook.com>
Tue, 18 Oct 2022 17:07:25 +0000 (10:07 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 18 Oct 2022 17:08:05 +0000 (10:08 -0700)
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

index 8ca37b9..f356531 100644 (file)
@@ -6616,7 +6616,7 @@ InstructionCost BoUpSLP::getEntryCost(const TreeEntry *E,
   case Instruction::Xor:
   case Instruction::GetElementPtr: {
     unsigned Opcode = ShuffleOrOp == Instruction::GetElementPtr
-                          ? Instruction::Add
+                          ? static_cast<unsigned>(Instruction::Add)
                           : ShuffleOrOp;
     auto GetScalarCost = [=](unsigned Idx) {
       auto *VI = dyn_cast<Instruction>(VL[Idx]);