[PATCH] D65088: [AMDGPU][RFC] New llvm.amdgcn.ballot intrinsic

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 10:20:23 PDT 2020


arsenm added a comment.

Also should add GlobalISel tests



================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:8684
+
+      return DCI.DAG.getCopyFromReg(DCI.DAG.getEntryNode(), SDLoc(N), Exec, VT);
+    }
----------------
Flakebi wrote:
> arsenm wrote:
> > I didn't think of it before, but reading exec this way could potentially be dangerous due to the fact that we have the terrible operations that modify exec in the middle of IR blocks, and we split them later. We might have to do this fold later
> What are these operations and how can I fix them?
> And shouldn’t this work as the instruction reads exec and thus should not be touched?
You can't really fix them in SelectionDAG. Things like the wwm/wqm intrinsics, and kills can exist in the middle of blocks (plus inline asm)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65088





More information about the llvm-commits mailing list