[PATCH] D79362: [AMDGPU] Fix FoldImmediate for 16 bit operand

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 16:41:42 PDT 2020


rampitec updated this revision to Diff 261952.
rampitec added a comment.

Always drop target flags on source operand. SubReg and TargetFlags share the same field changing the meaning depending on the operand type. If I do not drop it I get something like:

S_MOV_B32 target-flags(amdgpu-gotprel32-lo) 2048

Technically it could happen with 32 subregs as well, although does not seem to happen.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79362/new/

https://reviews.llvm.org/D79362

Files:
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.h
  llvm/test/CodeGen/AMDGPU/fold_16bit_imm.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79362.261952.patch
Type: text/x-patch
Size: 10196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200504/29ba88a8/attachment.bin>


More information about the llvm-commits mailing list