[PATCH] D115675: AMDGPU: Fix assert on function argument as loop condition

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 06:45:49 PST 2022


arsenm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/loop-on-function-argument.ll:23
+; CHECK-NEXT:    v_and_b32_e32 v0, 1, v0
+; CHECK-NEXT:    v_cmp_eq_u32_e32 vcc, 1, v0
+; CHECK-NEXT:    s_mov_b64 s[4:5], 0
----------------
foad wrote:
> rampitec wrote:
> > A side note, we could instead lower it into `v_cmp_ne_u32_e32 vcc, 0, v0` and then dead-code `v_and_b32_e32 v0, 1, v0`.
> Shouldn't the v_and be removed automatically, but only if the argument is marked as zeroext?
Yes. I've also been thinking of a future ABI change where we interpret i1 function arguments as being an SGPR bool mask instead of a VGPR


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

https://reviews.llvm.org/D115675



More information about the llvm-commits mailing list