diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp index b7fd0c93fa93f..a8d80f62844e9 100644 --- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp @@ -21863,8 +21863,7 @@ SDValue RISCVTargetLowering::LowerFormalArguments( "SiFive-CLIC-stack-swap", "SiFive-CLIC-preemptible-stack-swap", }; - if (llvm::find(SupportedInterruptKinds, Kind) == - std::end(SupportedInterruptKinds)) + if (!llvm::is_contained(SupportedInterruptKinds, Kind)) report_fatal_error( "Function interrupt attribute argument not supported!");