[PATCH] D35374: AMDGPU: Fix handling of div_scale with undef inputs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 11:28:19 PDT 2017


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

The src0 register must match src1 or src2, but if these
were undefined they could end up using different implicit_defed
virtual registers. Force these to use one undef vreg or pick the
defined other register.

      

Also fixes producing invalid nodes without the right number of
inputs when src2 is undef.


https://reviews.llvm.org/D35374

Files:
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/llvm.amdgcn.div.scale.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35374.106480.patch
Type: text/x-patch
Size: 7576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170713/424ad3d1/attachment.bin>


More information about the llvm-commits mailing list