[PATCH] D106918: [x86] improve CMOV codegen by pushing add into operands, part 3
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 23:48:53 PDT 2021
RKSimon 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
----------------
spatel wrote:
> 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.
We already have passes that convert add -> lea to break intefering eflags dependencies - I think this is fine.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106918/new/
https://reviews.llvm.org/D106918
More information about the llvm-commits
mailing list