diff --git a/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h b/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h --- a/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h +++ b/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h @@ -34,7 +34,7 @@ /// rather than optimal IR. That is, by default we bypass transformations that /// are likely to improve performance but make analysis for other passes more /// difficult. - SimplifyCFGPass() {} + SimplifyCFGPass(); /// Construct a pass with optional optimizations. SimplifyCFGPass(const SimplifyCFGOptions &PassOptions); diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp --- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -232,6 +232,10 @@ Options.SinkCommonInsts = UserSinkCommonInsts; } +SimplifyCFGPass::SimplifyCFGPass() : Options() { + applyCommandLineOverridesToOptions(Options); +} + SimplifyCFGPass::SimplifyCFGPass(const SimplifyCFGOptions &Opts) : Options(Opts) { applyCommandLineOverridesToOptions(Options); diff --git a/llvm/test/Transforms/SimplifyCFG/HoistCode.ll b/llvm/test/Transforms/SimplifyCFG/HoistCode.ll --- a/llvm/test/Transforms/SimplifyCFG/HoistCode.ll +++ b/llvm/test/Transforms/SimplifyCFG/HoistCode.ll @@ -1,4 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -passes=simplifycfg -hoist-common-insts=true -S | FileCheck %s ; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | FileCheck %s define void @foo(i1 %C, i32* %P) {