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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 03:30:16 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);
+  if (LC == RTLIB::MEMCHR)
----------------
sdesmalen-arm wrote:

This is not guarded by any test (when I remove the `if` statement, all tests still pass)

nit: for the actual condition, is it worth maybe adding a `bool ReturnResult` that is set in the switch statement above, and checking that instead? That makes this function easier to extend in the future.

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


More information about the llvm-commits mailing list