-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[AArch64][SME] Use reportFatalUsageError rather than assert (NFC) #145491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-backend-aarch64 Author: Benjamin Maxwell (MacDue) ChangesFixes #144351 Full diff: https://github.com/llvm/llvm-project/pull/145491.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index 8150e91c8ba52..65c3417cbb69f 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -481,7 +481,8 @@ AArch64TargetMachine::getSubtargetImpl(const Function &F) const {
MaxSVEVectorSize, IsStreaming, IsStreamingCompatible, HasMinSize);
}
- assert((!IsStreaming || I->hasSME()) && "Expected SME to be available");
+ if (IsStreaming && !I->hasSME())
+ reportFatalUsageError("Streaming SVE functions require SME");
return I.get();
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs test
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/25239 Here is the relevant piece of the build log for the reference
|
@@ -0,0 +1,7 @@ | |||
; RUN: not llc -mtriple aarch64-none-linux-gnu %s 2>&1 | FileCheck %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add "-o /dev/null" or something here to avoid opening an output file in the local directory, since it may be write protected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use -filetype=null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this to use -filetype=null
9fde72e 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #144351