[llvm] [DirectX] Add support for vector_reduce_add (PR #117646)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 12:30:19 PST 2024
================
@@ -67,11 +67,44 @@ static bool isIntrinsicExpansion(Function &F) {
case Intrinsic::dx_sign:
case Intrinsic::dx_step:
case Intrinsic::dx_radians:
+ case Intrinsic::vector_reduce_add:
+ case Intrinsic::vector_reduce_fadd:
return true;
}
return false;
}
+static Value *expandVecReduceFAdd(CallInst *Orig) {
+ // Note: vector_reduce_fadd first argument is a starting value
+ // Our use doesn't need it, so ignoring argument zero.
----------------
farzonl wrote:
This behavior is tested via tests with the `*_start1` postfix.
https://github.com/llvm/llvm-project/pull/117646
More information about the llvm-commits
mailing list