[PATCH] D64805: [AArch64] Don't call bcmp for small byte comparisons
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 01:07:15 PDT 2019
SjoerdMeijer added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:625
+ Options.MaxNumLoads = TLI->getMaxExpandSizeMemcmp(OptSize);
+ Options.NumLoadsPerBlock = 2;
+ Options.AllowOverlappingLoads = true;
----------------
why 2?
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:626
+ Options.NumLoadsPerBlock = 2;
+ Options.AllowOverlappingLoads = true;
+ Options.LoadSizes.push_back(8);
----------------
How about vector loads and alignment? Can we generate them for this, and do we then also need 16 byte loads to loadsizes?
================
Comment at: llvm/test/CodeGen/AArch64/bcmp-inline-small.ll:2
+; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s
+
+; CHECK-LABEL: bcmp_b2:
----------------
I think tests are missing for:
- code-size
- edge cases for NumLoadsPerBlock and MaxNumLoads
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64805/new/
https://reviews.llvm.org/D64805
More information about the llvm-commits
mailing list