[PATCH] D103321: [AMDGPU] Stop mulhi from doing 24 bit mul for uniform values
David Stuttard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 18 09:17:54 PDT 2021
dstuttard added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h:166
+ bool hasSMulHi() const {
+ return HasSMulHi;
+ }
----------------
foad wrote:
> dstuttard wrote:
> > foad wrote:
> > > I would just put the >= GFX9 test in here. No need for a HasSMulHi field. There are plenty of precedents for this.
> > Having given this some thought I'm not sure that I agree - the precedent in the implementation is to do something like I've implemented. That's the consistent thing to do.
> > Is there a good reason not to (other than it is slightly less code?) - implemented this way it is a lot clearer too.
> Both implementations ultimately say that s_mul_hi is supported on gfx9+. Mine just has fewer moving parts. I don't find yours clearer.
Until there's a variant at some point in the future that doesn't have SMulHi (although I guess the implementation can be changed if that ever occurs).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103321/new/
https://reviews.llvm.org/D103321
More information about the llvm-commits
mailing list