[llvm] [NVPTX] Fold vector FMAs in the IR peephole pass (PR #224018)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 12:47:56 PDT 2026
================
@@ -125,8 +125,9 @@ static bool foldFMA(Function &F) {
if (!BI->hasAllowContract())
continue;
- // Only float and double are supported.
- if (!BI->getType()->isFloatTy() && !BI->getType()->isDoubleTy())
+ // Float, double, and vectors thereof are supported.
+ Type *ScalarTy = BI->getType()->getScalarType();
+ if (!ScalarTy->isFloatTy() && !ScalarTy->isDoubleTy())
continue;
----------------
AlexMaclean wrote:
At this point, what does this check even exclude? F16 and BF16? These both support FMA too so perhaps we should just remove it.
https://github.com/llvm/llvm-project/pull/224018
More information about the llvm-commits
mailing list