[PATCH] D50629: AMDGPU: Fix getInstSizeInBytes

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 03:31:50 PDT 2018


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

Add some optional code to validate getInstSizeInBytes for emitted
instructions. This flushed out some issues which are fixed by this
patch:

- Streamline getInstSizeInBytes
- Properly define the VI readlane/writelane instruction as VOP3
- Fix the inline constant determination. Specifically, this change fixes an issue where a 32-bit value of 0xffffffff was recorded as unsigned. This is equal to -1 when restricting to a 32-bit comparison, and an inline constant can be used.

Change-Id: Id87c3b7975839da0de8156a124b0ce98c5fb47f2


Repository:
  rL LLVM

https://reviews.llvm.org/D50629

Files:
  lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/VOP2Instructions.td
  lib/Target/AMDGPU/VOP3Instructions.td
  test/CodeGen/AMDGPU/llvm.amdgcn.writelane.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50629.160320.patch
Type: text/x-patch
Size: 7489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180813/3b4f4eec/attachment.bin>


More information about the llvm-commits mailing list