[PATCH] D87158: [AMDGPU] Fix for folding v2.16 literals.

Daniil Fukalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 12:55:30 PDT 2020


dfukalov created this revision.
dfukalov added a reviewer: rampitec.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.
dfukalov requested review of this revision.
Herald added a subscriber: wdng.

It was found some packed immediate operands (e.g. `<half 1.0, half 2.0>`) are
incorrectly processed so one of two packed values were lost.

Introduced new function to check immediate 32-bit operand can be folded.
Converted condition about current op_sel flags value to fall-through.

Fixes: SWDEV-247595


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87158

Files:
  llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87158.290010.patch
Type: text/x-patch
Size: 5140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200904/145ae5da/attachment.bin>


More information about the llvm-commits mailing list