diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h index c98d08fa0888d..db5e80ccdbaab 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h @@ -327,11 +327,9 @@ class TargetLibraryInfo { bool AllowCallerSuperset) const { if (!AllowCallerSuperset) return OverrideAsUnavailable == CalleeTLI.OverrideAsUnavailable; - BitVector B = OverrideAsUnavailable; - B |= CalleeTLI.OverrideAsUnavailable; - // We can inline if the union of the caller and callee's nobuiltin - // attributes is no stricter than the caller's nobuiltin attributes. - return B == OverrideAsUnavailable; + // We can inline if the callee's nobuiltin attributes are no stricter than + // the caller's. + return !CalleeTLI.OverrideAsUnavailable.test(OverrideAsUnavailable); } /// Return true if the function type FTy is valid for the library function