git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249892
91177308-0d34-0410-b5e6-
96231b3b80d8
// FIXME: This could be refined to only bail if the convergent operation is
// not already control-dependent on the unswitch value.
for (const auto BB : currentLoop->blocks()) {
// FIXME: This could be refined to only bail if the convergent operation is
// not already control-dependent on the unswitch value.
for (const auto BB : currentLoop->blocks()) {
- for (const auto &I : *BB) {
- const auto CI = dyn_cast<CallInst>(&I);
- if (!CI) continue;
- if (CI->isConvergent())
+ for (auto &I : *BB) {
+ auto CS = CallSite(&I);
+ if (!CS) continue;
+ if (CS.hasFnAttr(Attribute::Convergent))