Skip to content

Commit

Permalink
generalize padd
Browse files Browse the repository at this point in the history
  • Loading branch information
newling committed Feb 19, 2025
1 parent 7acf46b commit e1cd157
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,9 @@ FailureOr<int> getStackSize(const std::string &aieAssembly) {
if (spIndex == std::string::npos) continue;
size_t startIndex = l.rfind(';', spIndex);
if (startIndex == std::string::npos) startIndex = 0;
size_t paddIndex = l.find("paddb", startIndex);
if (paddIndex == std::string::npos) {
paddIndex = l.find("padda", startIndex);
}
size_t paddIndex = l.find("padd", startIndex);
if (paddIndex == std::string::npos || paddIndex > spIndex) {
llvm::errs() << "Expected 'paddb [sp]' or 'paddb [sp]' in\n" << l << "\n";
llvm::errs() << "Expected 'padd(*)[sp]' in\n" << l << "\n";
return failure();
}
size_t hashIndex = l.find('#', spIndex);
Expand Down

0 comments on commit e1cd157

Please sign in to comment.