================
@@ -11285,6 +11285,21 @@ Value
*CodeGenFunction::EmitAArch64SMEBuiltinExpr(unsigned BuiltinID,
if (Builtin->LLVMIntrinsic == 0)
return nullptr;
+ if (BuiltinID == SME::BI__builtin_sme___arm_in_streaming_mode) {
+ // If we already know the streaming mode, don't bother with the intrinsic
+ // and emit a constant instead
+ auto FD = cast<FunctionDecl>(CurFuncDecl);
+ if (const Type *Ty = FD->getType().getTypePtrOrNull())
+ if (const auto *FPT = Ty->getAs<FunctionProtoType>()) {
----------------
sdesmalen-arm wrote:
```suggestion
if (const auto *FPT = F->getType()->getAs<FunctionProtoType>()) {
```
https://github.com/llvm/llvm-project/pull/120265
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits