[PATCH] D136244: [AArch64] Optimize memcmp when the result is tested for [in]equality with 0

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 01:49:16 PDT 2022


Allen marked an inline comment as done.
Allen added a comment.

In D136244#3876986 <https://reviews.llvm.org/D136244#3876986>, @dmgreen wrote:

> Could this be done during lowering, int AArch64TargetLowering::LowerSETCC, or does that not work?
> The getNZCVToSatisfyCondCode method is useful for getting the constant needed for CCMP's.

Thanks for your suggestion, I try to debug the function **br_on_cmp_i128_eq **in file CodeGen/AArch64/i128-cmp.ll, and find that the **setcc **is transform into **br_cc ** in AArch64TargetLowering::LowerOperation
so I think it can also work in AArch64TargetLowering. Out of intresting, I'd like to know why you recommend processing in the AArch64TargetLowering?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136244/new/

https://reviews.llvm.org/D136244



More information about the llvm-commits mailing list