[PATCH] D43327: [X86] Promote 16-bit cmovs to 32-bits

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 18:52:35 PST 2018


craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon.
craig.topper added a dependency: D38832: [X86][SelectionDAG] Add support for simplifying demanded bits of target nodes. Use it to simplify demanded bits of CMOV.

This allows us to avoid an opsize prefix. And forcing some move immediates to i32 avoid a length changing prefix on those instructions.

This mostly replaces the existing combine we had for zext/sext+cmov of constants. I left in a case for sign extending a 32 bit cmov of constants to 64 bits.


https://reviews.llvm.org/D43327

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx512-insert-extract.ll
  test/CodeGen/X86/avx512-mask-op.ll
  test/CodeGen/X86/avx512-schedule.ll
  test/CodeGen/X86/bool-simplify.ll
  test/CodeGen/X86/cmov-promotion.ll
  test/CodeGen/X86/iabs.ll
  test/CodeGen/X86/select.ll
  test/CodeGen/X86/setcc-lowering.ll
  test/CodeGen/X86/vector-compare-all_of.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43327.134359.patch
Type: text/x-patch
Size: 20866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180215/5de1f0d4/attachment.bin>


More information about the llvm-commits mailing list