[llvm] [LLVM] Add llvm.[su]mulh intrinsics. (PR #220293)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 01:25:34 PDT 2026
nikic wrote:
I'm not sure that adding intrinsics for these operations is a good idea. If the motivation here is primarily vectorization cost modelling, then I think we really need to come up with a generalizable solution to that problem that does not depend on adding new intrinsics for everything. There's a huge number of different operations that have SIMD instructions on some architecture, and adding intrinsics for all of them won't scale.
Can you explain in more detail what the other motivation ("simplify code generation for chained multiply-high operations") is?
The high level concern I have with new intrinsics like this is that we need to ensure that they optimize as well as their expanded form before we can use them.
> Anyway, the important part is I found recently there is already a way to write umulh using a umul.fix: https://godbolt.org/z/vajEM8Wz7
Support for the fixpoint intrinsics is quite bad, I'd rather not base mulh on them.
https://github.com/llvm/llvm-project/pull/220293
More information about the llvm-commits
mailing list