bool llvm::isIntrinsicReturningPointerAliasingArgumentWithoutCapturing(
const CallBase *Call, bool MustPreserveNullness) {
- return Call->getIntrinsicID() == Intrinsic::launder_invariant_group ||
- Call->getIntrinsicID() == Intrinsic::strip_invariant_group ||
- Call->getIntrinsicID() == Intrinsic::aarch64_irg ||
- Call->getIntrinsicID() == Intrinsic::aarch64_tagp ||
- (!MustPreserveNullness &&
- Call->getIntrinsicID() == Intrinsic::ptrmask);
+ switch (Call->getIntrinsicID()) {
+ case Intrinsic::launder_invariant_group:
+ case Intrinsic::strip_invariant_group:
+ case Intrinsic::aarch64_irg:
+ case Intrinsic::aarch64_tagp:
+ return true;
+ case Intrinsic::ptrmask:
+ return !MustPreserveNullness;
+ default:
+ return false;
+ }
}
/// \p PN defines a loop-variant pointer to an object. Check if the