[llvm] [CodeGen] Do not emit TRAP for `unreachable` after `@llvm.trap` (PR #94570)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 07:15:26 PDT 2024
================
@@ -1836,6 +1837,16 @@ class CallInst : public CallBase {
bool canReturnTwice() const { return hasFnAttr(Attribute::ReturnsTwice); }
void setCanReturnTwice() { addFnAttr(Attribute::ReturnsTwice); }
+ bool isNonContinuableTrap() const {
+ switch (getIntrinsicID()) {
+ case Intrinsic::trap:
+ case Intrinsic::ubsantrap:
+ return !hasFnAttr("trap-func-name");
----------------
arsenm wrote:
That seems like a separate bug?
https://github.com/llvm/llvm-project/pull/94570
More information about the llvm-commits
mailing list