[PATCH] D55414: [X86] Emit SBB instead of SETCC_CARRY from LowerSELECT. Break false dependency on the SBB input.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 23:49:10 PST 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.
Herald added a subscriber: javed.absar.

I'm hoping we can just replace SETCC_CARRY with SBB. This is another step towards that.

I've explicitly used zero as the input to the setcc to avoid a false dependency that we've had with the SETCC_CARRY. I change one of the patterns that used NEG to instead use an explicit compare with 0 on the LHS. We needed the zero anyway to avoid the false dependency. The negate would clobber its input register. By using a CMP we can avoid that which could be useful.


Repository:
  rL LLVM

https://reviews.llvm.org/D55414

Files:
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrCompiler.td
  test/CodeGen/X86/pr35972.ll
  test/CodeGen/X86/scheduler-backtracking.ll
  test/CodeGen/X86/select.ll
  test/CodeGen/X86/shl-crash-on-legalize.ll
  test/CodeGen/X86/vector-compare-any_of.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55414.177131.patch
Type: text/x-patch
Size: 21021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181207/50319039/attachment.bin>


More information about the llvm-commits mailing list