[PATCH] D46202: [X86] Make the STTNI flag intrinsics use the flags from pcmpestrm/pcmpistrm if the mask instrinsics are also used in the same basic block.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 11:31:05 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: chandlerc, RKSimon, spatel.

Previously the flag intrinsics always used the index instructions even if a mask instruction also exists.

To fix fix this I've created a single ISD node type that returns index, mask, and flags. The SelectionDAG CSE process will merge all flavors of intrinsics with the same inputs to a s ingle node. Then during isel we just have to look at which results are used to know what instruction to generate. If both mask and index are used we'll need to emit two instructions. But for all other cases we can emit a single instruction.

Since I had to do manual isel anyway, I've removed the pseudo instructions and custom inserter code that was working around tablegen limitations with multiple implicit defs.

I've also renamed the recently added sse42.ll test case to sttni.ll since it focuses on that subset of the sse4.2 instructions.


Repository:
  rL LLVM

https://reviews.llvm.org/D46202

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Target/X86/X86InstrFragmentsSIMD.td
  lib/Target/X86/X86InstrInfo.cpp
  lib/Target/X86/X86InstrSSE.td
  test/CodeGen/X86/sse42.ll
  test/CodeGen/X86/sttni.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46202.144373.patch
Type: text/x-patch
Size: 36377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180427/984e2480/attachment.bin>


More information about the llvm-commits mailing list