[PATCH] D146287: [AMDGPU][GISel] Add inverse ballot intrinsic

Jessica Del via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 02:28:27 PDT 2023


OutOfCache added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/llvm.amdgcn.inverse.ballot.i32.ll:118-129
+; GISEL-LABEL: inverse_ballot_branch:
+; GISEL:       ; %bb.0: ; %entry
+; GISEL-NEXT:    s_xor_b32 s2, s1, -1
+; GISEL-NEXT:    s_and_saveexec_b32 s1, s2
+; GISEL-NEXT:  ; %bb.1: ; %if
+; GISEL-NEXT:    s_add_i32 s0, s0, 1
+; GISEL-NEXT:  ; %bb.2: ; %endif
----------------
nhaehnle wrote:
> This code is wrong. That's a problem that's orthogonal to your change and has to do with GlobalISel not correctly taking uniformity analysis into account (yet). But please add a comment to make a note of it (same in the corresponding wave64 test).
> 
> The SDAG code is correct.
What is incorrect here? I only see the additional `v_mov` in the SelDAG code, but every other instruction seems to be the same.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146287



More information about the llvm-commits mailing list