[PATCH] D106684: [x86] improve CMOV codegen by pushing add into operands, part 2

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 24 00:36:04 PDT 2021


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

LG unless there are other comments.
Thanks.



================
Comment at: llvm/test/CodeGen/X86/add-cmov.ll:158-159
 ; CHECK-NEXT:    retq
   %s = select i1 %b, i64 42, i64 2147483648
   %r = add i64 %offset, %s
   ret i64 %r
----------------
Would transforming this into
```
  %tval = add i64 %offset, 42
  %fval = add i64 %tval, 2147483606
  %r = select i1 %b, i64 %tval, i64 %fval
```
be a win? https://godbolt.org/z/rYjzePnr4


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

https://reviews.llvm.org/D106684



More information about the llvm-commits mailing list