[PATCH] D31762: AMDGPU: Add new amdgcn.init.exec intrinsics

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 09:47:14 PDT 2017


arsenm added inline comments.


================
Comment at: include/llvm/IR/IntrinsicsAMDGPU.td:117-121
+// Set EXEC according to a thread count packed in an SGPR input:
+//    thread_count = (input >> bitoffset) & 0x7f;
+// This is always moved to the beginning of the basic block.
+def int_amdgcn_init_exec_from_input : Intrinsic<[],
+  [llvm_i32_ty,       // 32-bit SGPR input
----------------
Why can't you emit this sequence and feed that into the first intrinsic?


================
Comment at: test/CodeGen/AMDGPU/set-initial-exec.ll:1
+;RUN: llc < %s -march=amdgcn -mcpu=gfx900 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK
+
----------------
s/CHECK/GCN/


https://reviews.llvm.org/D31762





More information about the llvm-commits mailing list