[PATCH] D55882: [InstCombine][AMDGPU] Handle more buffer intrinsics

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 06:16:22 PST 2018


piotr added a comment.

In D55882#1336102 <https://reviews.llvm.org/D55882#1336102>, @arsenm wrote:

> LGTM. Can the scalar load intrinsics also be handled?


Hi Arsen,

Could you please describe what kind of a transformation you have in mind?

The function simplifyAMDGCNMemoryIntrinsicDemanded only does a useful work for vector inputs.

The primary gain from this patch is to handle such constructs as evidenced in test line 471:

from:

  %data = call <3 x float> @llvm.amdgcn.raw.buffer.load.v3f32
  %elt0 = extractelement <3 x float> %data, i32 0
  ret float %elt0

into

  %data = call float @llvm.amdgcn.raw.buffer.load.f32
  ret float %data


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55882





More information about the llvm-commits mailing list