[llvm] [AArch64][SME] Lower memchr to __arm_sc_memchr in streaming[-compatible] functions (PR #168896)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 08:57:01 PST 2025


================
@@ -194,7 +200,11 @@ SDValue AArch64SelectionDAGInfo::EmitStreamingCompatibleMemLibCall(
   PointerType *RetTy = PointerType::getUnqual(*DAG.getContext());
   CLI.setDebugLoc(DL).setChain(Chain).setLibCallee(
       TLI->getLibcallCallingConv(NewLC), RetTy, Symbol, std::move(Args));
-  return TLI->LowerCallTo(CLI).second;
+
+  auto [Result, ChainOut] = TLI->LowerCallTo(CLI);
----------------
huntergr-arm wrote:

Does this mean the return value of memset, memmove, etc are discarded?

I know that the returned pointers are just the destination and are almost certainly ignored at the programmer's level, but if there's some extra-paranoid code out there which verifies the return value what happens? Is it handled elsewhere?

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


More information about the llvm-commits mailing list