We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fa35f0 commit d04a4a0Copy full SHA for d04a4a0
llvm/lib/IR/AutoUpgrade.cpp
@@ -704,11 +704,11 @@ static Intrinsic::ID ShouldUpgradeNVPTXBF16Intrinsic(StringRef Name) {
704
static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
705
assert(F && "Illegal to upgrade a non-existent Function.");
706
707
- // Quickly eliminate it, if it's not a candidate.
708
StringRef Name = F->getName();
709
- if (Name.size() <= 7 || !Name.starts_with("llvm."))
+
+ // Quickly eliminate it, if it's not a candidate.
710
+ if (!Name.consume_front("llvm.") || Name.empty())
711
return false;
- Name = Name.substr(5); // Strip off "llvm."
712
713
switch (Name[0]) {
714
default: break;
0 commit comments