[PATCH] D50600: AMDGPU: Use splat vectors for undefs when folding canonicalize

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 11 00:59:08 PDT 2018


arsenm created this revision.
arsenm added a reviewer: rampitec.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.

If one of the elements is undef, use the canonicalized constant
from the other element instead of 0.

      

Splat vectors are more useful for other optimizations, such
as matching vector clamps. This was breaking on clamps
of half3 from the undef 4th component.


https://reviews.llvm.org/D50600

Files:
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/clamp.ll
  test/CodeGen/AMDGPU/fcanonicalize.f16.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50600.160233.patch
Type: text/x-patch
Size: 7292 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180811/2a4a9731/attachment.bin>


More information about the llvm-commits mailing list