[VPlan] Branches are not widened by VPWidenRecipe, assert (NFC).
authorFlorian Hahn <flo@fhahn.com>
Tue, 14 Apr 2020 08:36:16 +0000 (09:36 +0100)
committerFlorian Hahn <flo@fhahn.com>
Wed, 15 Apr 2020 11:03:45 +0000 (12:03 +0100)
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index 0107f5a..35ed4c0 100644 (file)
@@ -6930,8 +6930,8 @@ VPRecipeBuilder::tryToWidenCall(Instruction *I, VFRange &Range, VPlan &Plan) {
 }
 
 bool VPRecipeBuilder::shouldWiden(Instruction *I, VFRange &Range) const {
-  assert(!isa<PHINode>(I) && !isa<LoadInst>(I) && !isa<StoreInst>(I) &&
-         "Instruction should have been handled earlier");
+  assert(!isa<BranchInst>(I) && !isa<PHINode>(I) && !isa<LoadInst>(I) &&
+         !isa<StoreInst>(I) && "Instruction should have been handled earlier");
   // Instruction should be widened, unless it is scalar after vectorization,
   // scalarization is profitable or it is predicated.
   auto WillScalarize = [this, I](unsigned VF) -> bool {
@@ -6961,7 +6961,6 @@ VPWidenRecipe *VPRecipeBuilder::tryToWiden(Instruction *I, VPlan &Plan) {
     case Instruction::And:
     case Instruction::AShr:
     case Instruction::BitCast:
-    case Instruction::Br:
     case Instruction::FAdd:
     case Instruction::FCmp:
     case Instruction::FDiv: