[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
Sat Oct 22 07:38:12 PDT 2022


Allen marked 3 inline comments as done.
Allen added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/i128-cmp.ll:21-22
+; CHECK-NEXT:    cmp x0, x2
+; CHECK-NEXT:    ccmp x1, x3, #0, eq
+; CHECK-NEXT:    cset w0, eq
 ; CHECK-NEXT:    ret
----------------
dmgreen wrote:
> And here it needs to set based on ne, so maybe `ccmp #8, eq; cmp ne`.
> 
> Those two verify as equivalent.
can also find the cases in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104611


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

https://reviews.llvm.org/D136244



More information about the llvm-commits mailing list