[PATCH] D30466: AMDGPU: Add simple machine level computeKnownBits

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 10:59:44 PST 2017


arsenm created this revision.
Herald added subscribers: tpr, dstuttard, tony-tye, yaxunl, nhaehnle, wdng, kzhuravl.

The DAG makes it difficult/impossible to make the right
decisions when there are no direct equivalents between SALU
and VALU instructions.

     

For example, we can use the v_cvt_pk_u16_u32 instruction to
pack a v2i16 if the known high bits are 0. However there is no
scalar equivalent, so pattern matching this in the DAG
introduces divergences from what would be a simple bit pattern.
With known bits, we can pattern match this after it is known
to really be a vector op.

      

This also may be useful for the SDWA pass.


https://reviews.llvm.org/D30466

Files:
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIInstrInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30466.90061.patch
Type: text/x-patch
Size: 5457 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170228/3b02d90e/attachment.bin>


More information about the llvm-commits mailing list