[PATCH] D59501: [AMDGPU] Enable code selection using `s_mul_hi_u32`/`s_mul_hi_i32`.

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 13:10:31 PDT 2019


rampitec added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/mul.ll:143
 ; FUNC-LABEL: {{^}}s_mul_i64:
+; GFX9: s_mul_hi_u32
+; GFX9: s_endpgm
----------------
hliao wrote:
> rampitec wrote:
> > Don't you need to check for s_mul_lo as well here?
> There is only 's_mul_i32' instead of `s_mul_lo`. `s_mul_i32' is already supported in  the current code base.
Right. I just assume it is a good idea we have low multiplication check anyway.


================
Comment at: llvm/test/CodeGen/AMDGPU/mul.ll:143
 ; FUNC-LABEL: {{^}}s_mul_i64:
+; GFX9: s_mul_hi_u32
+; GFX9: s_endpgm
----------------
arsenm wrote:
> rampitec wrote:
> > hliao wrote:
> > > rampitec wrote:
> > > > Don't you need to check for s_mul_lo as well here?
> > > There is only 's_mul_i32' instead of `s_mul_lo`. `s_mul_i32' is already supported in  the current code base.
> > Right. I just assume it is a good idea we have low multiplication check anyway.
> There is no _lo, it's the same. More checks are better though
The only thing I suggest is to use GFX9-DAG as they may be easily reordered.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59501





More information about the llvm-commits mailing list