[PATCH] D34904: [CGP] use subtract of cmps for result of memcmp expansion

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 08:53:24 PDT 2017


spatel added inline comments.


================
Comment at: test/CodeGen/X86/memcmp.ll:38
+; X64-NEXT:    seta %al
+; X64-NEXT:    sbbl $0, %eax
 ; X64-NEXT:    retq
----------------
efriedma wrote:
> Potential alternative sequence: instead of xorl+cmpw+seta+sbbl, just generate a "subl", like we do for length 1.
Ah, of course. I've been trying to find a way to use subtract in the larger cases, but this is straightforward for i8/i16. I'll update the patch.


https://reviews.llvm.org/D34904





More information about the llvm-commits mailing list