[PATCH] D27173: AMDGPU: Disallow exec as SMEM instruction operand

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 11:58:00 PST 2016


arsenm created this revision.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: tony-tye, yaxunl, nhaehnle, wdng, kzhuravl, qcolombet.
Herald added a reviewer: tstellarAMD.

This is not in the list of valid inputs for the encoding.
When spilling, copies from exec can be folded directly
into the spill instruction which results in broken
stores.

      

This only fixes the operand constraints, more codegen
work is required to avoid emitting the invalid
spills.

This sort of breaks the dbg.value test. Because the
 register class of the s_load_dwordx2 changes, there
 is a copy to SReg_64, and the copy is the operand
 of dbg_value. The copy is later dead, and removed
 from the dbg_value.


https://reviews.llvm.org/D27173

Files:
  lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
  lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h
  lib/Target/AMDGPU/SIRegisterInfo.td
  lib/Target/AMDGPU/SMInstructions.td
  test/CodeGen/AMDGPU/llvm.dbg.value.ll
  test/CodeGen/AMDGPU/spill-m0.ll
  test/MC/AMDGPU/smem-err.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27173.79431.patch
Type: text/x-patch
Size: 14372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161128/bddafcd6/attachment.bin>


More information about the llvm-commits mailing list