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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 03:12:08 PST 2022


foad 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
----------------
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?


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

https://reviews.llvm.org/D115675



More information about the llvm-commits mailing list