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

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 15:08:08 PDT 2022


rampitec added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/mad_u64_u32.ll:6
+
+define amdgpu_ps float @mad_i32_vvv(i32 %a, i32 %b, i32 %c) {
+; GFX9-LABEL: mad_i32_vvv:
----------------
rampitec wrote:
> arsenm wrote:
> > Should also test globalisel
> GlobalISel does not work:
> 
> VOP3Instructions.td:582:1: warning: Skipped pattern: Could not infer class for EXTRACT_SUBREG operand #0
> def : IMAD32_Pats<V_MAD_U64_U32_e64>;
> 
> This instruction has 2 results, gisel does not handle it.
Moreover, if I restate it this way:
```
  (EXTRACT_SUBREG (i32 (COPY_TO_REGCLASS (inst $src0, $src1,
                                          (REG_SEQUENCE SReg_64, // Use scalar and let it be legalized
                                                        $src2, sub0,
                                                        (i32 (IMPLICIT_DEF)), sub1),
                                          0 /* clamp */), VReg_64)),
                  sub0)
```
The message it clearer:

VOP3Instructions.td:582:1: warning: Skipped pattern: Dst pattern child has multiple results
def : IMAD32_Pats<V_MAD_U64_U32_e64>;


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

https://reviews.llvm.org/D127253



More information about the llvm-commits mailing list