[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 8ca37b9fa1bf5d1dfb7aa74def55e4598644bdd7..f35653197ff2f932082438c2ff1628e67819bca7 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]);