[llvm] [TLI] replace-with-veclib works with FRem Instruction. (PR #76166)

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 04:28:36 PST 2024


================
@@ -100,26 +100,26 @@ static void replaceWithTLIFunction(Instruction &I, VFInfo &Info,
 /// works when \p I is a call to vectorized intrinsic or the frem instruction.
 static bool replaceWithCallToVeclib(const TargetLibraryInfo &TLI,
                                     Instruction &I) {
+  auto *VTy = dyn_cast<VectorType>(I.getType());
+  ElementCount EC(VTy ? VTy->getElementCount() : ElementCount::getFixed(0));
----------------
mgabka wrote:

nit: might be worth to drop a short comment:
"A the moment VFABI assumes the return type is always widened unless it is a void type."

https://github.com/llvm/llvm-project/pull/76166


More information about the llvm-commits mailing list