[clang] [llvm] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode intrinsic (PR #120265)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 09:33:31 PST 2024


================
@@ -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
----------------
MacDue wrote:

(optional suggestion): Rather than doing this while emitting builtins you could always emit the intrinsic, then handle the `Intrinsic::aarch64_sme_in_streaming_mode` in `llvm/lib/Analysis/ConstantFolding.cpp` (other target specific intrinsics are already handled there). 

https://github.com/llvm/llvm-project/pull/120265


More information about the llvm-commits mailing list