[PATCH] D63206: [AMDGPU] gfx1010 wavefrontsize intrinsic folding

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 08:16:12 PDT 2019


arsenm added a comment.

I don't see codegen for this, so this looks like depending on an optimization pass for correctness



================
Comment at: lib/Target/AMDGPU/AMDGPULibCalls.cpp:1392-1414
+bool AMDGPULibCalls::fold_wavefrontsize(CallInst *CI, IRBuilder<> &B) {
+  if (!TM)
+    return false;
+
+  StringRef CPU = TM->getTargetCPU();
+  StringRef Features = TM->getTargetFeatureString();
+  if ((CPU.empty() || CPU.equals_lower("generic")) &&
----------------
This doesn't really belong in this pass


================
Comment at: test/CodeGen/AMDGPU/llvm.amdgcn.wavefrontsize.ll:7-8
+; RUN: opt -mtriple=amdgcn-- -O3 -S < %s | FileCheck -check-prefixes=OPT,OPT-WXX %s
+; RUN: opt -mtriple=amdgcn-- -O3 -mattr=+WavefrontSize32 -S < %s | FileCheck -check-prefixes=OPT,OPT-W32 %s
+; RUN: opt -mtriple=amdgcn-- -O3 -mattr=+WavefrontSize64 -S < %s | FileCheck -check-prefixes=OPT,OPT-W64 %s
+; RUN: opt -mtriple=amdgcn-- -mcpu=tonga -O3 -S < %s | FileCheck -check-prefixes=OPT,OPT-W64 %s
----------------
Capitalized feature name is wrong? Also shouldn't be using opt -O3


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

https://reviews.llvm.org/D63206





More information about the llvm-commits mailing list