[llvm] [AArch64][SME] Use reportFatalUsageError rather than assert (NFC) (PR #145491)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 03:12:06 PDT 2025
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/145491
Fixes #144351
>From 30d0f848facd652a3052a88107267e147b65b80c Mon Sep 17 00:00:00 2001
From: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: Tue, 24 Jun 2025 10:07:36 +0000
Subject: [PATCH] [AArch64][SME] Use reportFatalUsageError rather than assert
(NFC)
Fixes #144351
---
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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();
}
More information about the llvm-commits
mailing list