Lines Matching +full:acc +full:- +full:enable
1 //===- ExpandReductions.cpp - Expand reduction intrinsics -----------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // to enable the intrinsics until just before codegen.
12 //===----------------------------------------------------------------------===//
34 switch (II->getIntrinsicID()) { in expandReductions()
49 if (TTI->shouldExpandReduction(II)) in expandReductions()
59 isa<FPMathOperator>(II) ? II->getFastMathFlags() : FastMathFlags{}; in expandReductions()
60 Intrinsic::ID ID = II->getIntrinsicID(); in expandReductions()
63 TTI->getPreferredExpandedReductionShuffle(II); in expandReductions()
75 Value *Acc = II->getArgOperand(0); in expandReductions() local
76 Value *Vec = II->getArgOperand(1); in expandReductions()
79 Rdx = getOrderedReduction(Builder, Acc, Vec, RdxOpcode, RK); in expandReductions()
82 cast<FixedVectorType>(Vec->getType())->getNumElements())) in expandReductions()
85 Rdx = Builder.CreateBinOp((Instruction::BinaryOps)RdxOpcode, Acc, Rdx, in expandReductions()
99 Value *Vec = II->getArgOperand(0); in expandReductions()
100 auto *FTy = cast<FixedVectorType>(Vec->getType()); in expandReductions()
101 unsigned NumElts = FTy->getNumElements(); in expandReductions()
105 if (FTy->getElementType() == Builder.getInt1Ty()) { in expandReductions()
109 Rdx, ConstantInt::getAllOnesValue(Rdx->getType())); in expandReductions()
127 Value *Vec = II->getArgOperand(0); in expandReductions()
129 cast<FixedVectorType>(Vec->getType())->getNumElements())) in expandReductions()
139 Value *Vec = II->getArgOperand(0); in expandReductions()
141 cast<FixedVectorType>(Vec->getType())->getNumElements()) || in expandReductions()
149 II->replaceAllUsesWith(Rdx); in expandReductions()
150 II->eraseFromParent(); in expandReductions()
176 INITIALIZE_PASS_BEGIN(ExpandReductions, "expand-reductions",
179 INITIALIZE_PASS_END(ExpandReductions, "expand-reductions", in INITIALIZE_PASS_DEPENDENCY()