[InstCombine] Fix a compilation bug
authorYonghong Song <yhs@fb.com>
Mon, 17 Aug 2020 04:56:42 +0000 (21:56 -0700)
committerYonghong Song <yhs@fb.com>
Mon, 17 Aug 2020 04:56:42 +0000 (21:56 -0700)
With gcc 6.3.0, I hit the following compilation bug.
  ../lib/Transforms/InstCombine/InstCombineVectorOps.cpp:937:2: error: extra ‘;’ [-Werror=pedantic]
   };
    ^
  cc1plus: all warnings being treated as errors

The error is introduced by Commit ae7f08812e09 ("[InstCombine]
Aggregate reconstruction simplification (PR47060)")

llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

index 4d0e58b..a10493b 100644 (file)
@@ -934,7 +934,7 @@ Instruction *InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(
 
   ++NumAggregateReconstructionsSimplified;
   return PHI;
-};
+}
 
 /// Try to find redundant insertvalue instructions, like the following ones:
 ///  %0 = insertvalue { i8, i32 } undef, i8 %x, 0