[PATCH] D127253: [AMDGPU] Use v_mad_u64_u32 for IMAD32

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 04:16:11 PDT 2022


foad added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/mad_64_32.ll:302-304
+; GFX9-NEXT:    v_mov_b32_e32 v2, v1
+; GFX9-NEXT:    v_mad_u64_u32 v[2:3], s[4:5], v5, v4, v[2:3]
+; GFX9-NEXT:    v_mov_b32_e32 v1, v2
----------------
It's a shame about the extra movs around the mad but that is not your fault.


================
Comment at: llvm/test/CodeGen/AMDGPU/mad_u64_u32.ll:46
+; GFX9-NEXT:    s_mov_b32 s0, 42
+; GFX9-NEXT:    v_mad_u64_u32 v[0:1], s[0:1], v0, v1, s[0:1]
+; GFX9-NEXT:    ; return to shader part epilog
----------------
As a follow up it would be nice if we could fold the "42" into the mad as an inline src2.


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

https://reviews.llvm.org/D127253



More information about the llvm-commits mailing list