[PATCH] D50157: [X86] Allow fake unary unpckhpd and movhlps to be commuted for execution domain fixing purposes

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 1 13:09:05 PDT 2018


craig.topper created this revision.
craig.topper added a reviewer: RKSimon.

These instructions perform the same operation, but the semantic of which operand is destroyed is reversed. If the same register is used as both operands we can change the execution domain without worrying about this difference.

Unfortunately, this really only works in cases where the input register is killed by the instruction. If its not killed, the two address isntruction pass inserts a copy that will become a move instruction. This makes the instruction use different physical registers that contain the same data at the time the unpck/movhlps executes. I've considered using a unary pseudo instruction with tied operand to trick the two address instruction pass. We could then expand the pseudo post regalloc to get the same physical register on both inputs.


https://reviews.llvm.org/D50157

Files:
  lib/Target/X86/X86InstrInfo.cpp
  test/CodeGen/X86/sse_partial_update.ll
  test/CodeGen/X86/var-permute-128.ll
  test/CodeGen/X86/vec_extract.ll
  test/CodeGen/X86/vec_fp_to_int.ll
  test/CodeGen/X86/vector-reduce-fadd.ll
  test/CodeGen/X86/vector-reduce-fmul.ll
  test/CodeGen/X86/vector-shuffle-128-v2.ll
  test/CodeGen/X86/vector-shuffle-combining.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50157.158611.patch
Type: text/x-patch
Size: 26034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180801/4dcf6bc7/attachment.bin>


More information about the llvm-commits mailing list