[PATCH] D76836: [AMDGPU] Add G16 support to image instructions

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 07:00:58 PDT 2020


arsenm added a comment.

Can you also add this to the GlobalISel legalization



================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:5468-5469
     // Illegal to use a16 images
-    if (!ST->hasFeature(AMDGPU::FeatureR128A16) && !ST->hasFeature(AMDGPU::FeatureGFX10A16))
+    if (!ST->hasFeature(AMDGPU::FeatureR128A16) &&
+        !ST->hasFeature(AMDGPU::FeatureGFX10A16)) {
+      LLVM_DEBUG(dbgs() << "Failed to lower image intrinsic: Target does not "
----------------
ST->hasR128A16() && ST->hasGFX10A16(). We should probably add a hasA16 that checks both


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:5508
+  if (IsG16) {
+    if (!ST->hasFeature(AMDGPU::FeatureG16)) {
+      LLVM_DEBUG(dbgs() << "Failed to lower image intrinsic: Target does not "
----------------
ST->hasG16()


================
Comment at: llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.encode.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -march=amdgcn -mcpu=gfx1010 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX10 %s
+
----------------
Needs gfx9 checks too


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76836





More information about the llvm-commits mailing list