[PATCH] D14496: X86: More efficient codegen for 64-bit compares on 32-bit target

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 16:46:34 PST 2015


hans updated this revision to Diff 40453.
hans added a comment.

Apologies for the delay.

Here is a version using the proposed SETCCE approach. I think this turned out really well, and of course the code for e.g. 128-bit compares is now very nice.

The only downside I can think of is that this gives targets less flexibility in lowering. For example, with SETCC_PARTS a target could choose to lower with a three-way branch on the high part if it wanted too. On the other hand, this flexibility meant more work; the SETCCE node should be very straight-forward for targets to handle, and it handles the cases with more than two halves nicely so I think it's the better option.

Please take a look and let me know what you think.


http://reviews.llvm.org/D14496

Files:
  include/llvm/CodeGen/ISDOpcodes.h
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  test/CodeGen/X86/2012-08-17-legalizer-crash.ll
  test/CodeGen/X86/atomic-minmax-i6432.ll
  test/CodeGen/X86/atomic128.ll
  test/CodeGen/X86/avx512-cmp.ll
  test/CodeGen/X86/wide-integer-cmp.ll
  test/CodeGen/X86/win32-pic-jumptable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14496.40453.patch
Type: text/x-patch
Size: 17440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151118/7eefd061/attachment.bin>


More information about the llvm-commits mailing list