diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index b410df0c5f68c..915e053704b23 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -59,6 +59,7 @@  #include "llvm/IR/User.h"  #include "llvm/IR/Value.h"  #include "llvm/IR/ValueHandle.h" +#include "llvm/InitializePasses.h"  #include "llvm/Pass.h"  #include "llvm/Support/Casting.h"  #include "llvm/Support/CommandLine.h" @@ -683,7 +684,7 @@ bool LoopUnswitch::processCurrentLoop() {      for (auto &I : *BB) {        auto CS = CallSite(&I);        if (!CS) continue; -      if (CS.hasFnAttr(Attribute::Convergent)) +      if (CS.isConvergent())          return false;        if (auto *II = dyn_cast<InvokeInst>(&I))          if (!II->getUnwindDest()->canSplitPredecessors())  | 
