================
@@ -281,6 +285,21 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo
&TI,
<< toString(Result, 10) << (IsUnsigned ? "0-4, 6" : "0, 5, 7") <<
"8"
<< Arg->getSourceRange();
}
+ case PPC::BI__builtin_amo_lwat_cond:
+ case PPC::BI__builtin_amo_ldat_cond:
+ case PPC::BI__builtin_amo_lwat_cond_s:
+ case PPC::BI__builtin_amo_ldat_cond_s: {
+ llvm::APSInt Result;
+ if (SemaRef.BuiltinConstantArg(TheCall, 1, Result))
+ return true;
+ unsigned Val = Result.getZExtValue();
+ if (llvm::is_contained({24u, 25u, 28u}, Val))
+ return false;
----------------
maryammo wrote:
Different AMO builtins have different valid discrete values for FC, and FC
might be a different argument position, so this code would be almost repeated
in such a function. But if that makes more sense, I can refactor it.
https://github.com/llvm/llvm-project/pull/169435
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits