[PATCH] D122676: BPF: support inlining __builtin_memcmp intrinsic call
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 11:52:04 PDT 2022
yonghong-song created this revision.
yonghong-song added a reviewer: ast.
Herald added subscribers: steven.zhang, hiraditya.
Herald added a project: All.
yonghong-song requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Delyan Kratunov reported an issue where __builtin_memcpy is
not inlined into simple load/compare instructions.
This is a known issue. In the current state, __builtin_memcmp
will be converted to memcmp call which won't work for
bpf programs.
This patch added support for expanding __builtin_memcmp with
actual loads and compares up to currently maximum 128 total loads.
The implementation is identical to PowerPC.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122676
Files:
llvm/lib/Target/BPF/BPFISelLowering.cpp
llvm/lib/Target/BPF/BPFTargetTransformInfo.h
llvm/test/CodeGen/BPF/memcmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122676.418943.patch
Type: text/x-patch
Size: 4642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220329/fbde7033/attachment.bin>
More information about the llvm-commits
mailing list