[PATCH] D106918: [x86] improve CMOV codegen by pushing add into operands, part 3

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 18:37:13 PDT 2021


spatel added inline comments.


================
Comment at: llvm/test/CodeGen/X86/add-cmov.ll:284
+; CHECK-NEXT:    addq $60, %rdx
 ; CHECK-NEXT:    testb $1, %dil
+; CHECK-NEXT:    cmovneq %rcx, %rdx
----------------
pengfei wrote:
> lea won't affect eflags, so it may still be better than add in some complex scenarios I guess?
That's true in general, but I don't think it can be a factor in this transform because we know that the cmov is a user of eflags, so it is already being set by some other op.


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

https://reviews.llvm.org/D106918



More information about the llvm-commits mailing list