[PATCH] D106721: [AArch64] Implemnt MSVC __mulh and __umulh builtins and corresponding IR level intrinsics

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 23 19:57:15 PDT 2021


rnk added a comment.

In D106721#2901728 <https://reviews.llvm.org/D106721#2901728>, @efriedma wrote:

> Do we need LLVM intrinsics for these?  For the x86 equivalents, we just generate `mul i128`.

I worry that LLVM will end up generating a call to compiler-rt to implement i128 arithmetic, especially in unoptimized builds, and currently nothing autolinks `clang_rt.builtins-${arch}.lib` in an MSVC environment. We can do that, I filed an issue for it, it just needs to get done.

I also worry that without the intrinsic, LLVM will more often than not fail to match the pattern here. The issues users filed about x86 rotate instructions come to mind, LLVM failed to produce the desired `rot` instructions sometimes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106721



More information about the cfe-commits mailing list