[PATCH] D60333: [X86][SSE] SimplifyDemandedBitsForTargetNode - Add PACKSS support

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 12:14:50 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, lebedev.ri, nikic.
Herald added a project: LLVM.

In the case where we only want the sign bit (e.g. when using PACKSS truncation of comparison results for MOVMSK) then we can just demand the sign bit of the source operands.

This makes use of the fact that PACKSS saturates out of range values to the +/- max int values - so the sign bit is always preserved.


Repository:
  rL LLVM

https://reviews.llvm.org/D60333

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/bitcast-and-setcc-512.ll
  test/CodeGen/X86/bitcast-setcc-128.ll
  test/CodeGen/X86/bitcast-setcc-256.ll
  test/CodeGen/X86/bitcast-setcc-512.ll
  test/CodeGen/X86/movmsk-cmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60333.193932.patch
Type: text/x-patch
Size: 20379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190405/89223a0f/attachment.bin>


More information about the llvm-commits mailing list