File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ class AArch64TTIImpl : public BasicTTIImplBase<AArch64TTIImpl> {
368368 InstructionCost Invalid = InstructionCost::getInvalid ();
369369 InstructionCost Cost (TTI::TCC_Basic);
370370
371- if (Opcode != Instruction::Add && Opcode != Instruction::Sub )
371+ if (Opcode != Instruction::Add)
372372 return Invalid;
373373
374374 if (InputTypeA != InputTypeB)
Original file line number Diff line number Diff line change @@ -317,22 +317,13 @@ void VPPartialReductionRecipe::execute(VPTransformState &State) {
317317 State.setDebugLocFrom (getDebugLoc ());
318318 auto &Builder = State.Builder ;
319319
320+ assert (getOpcode () == Instruction::Add &&
321+ " Unhandled partial reduction opcode" );
322+
320323 Value *BinOpVal = State.get (getOperand (0 ));
321324 Value *PhiVal = State.get (getOperand (1 ));
322325 assert (PhiVal && BinOpVal && " Phi and Mul must be set" );
323326
324- auto Opcode = getOpcode ();
325-
326- // Currently we don't have a partial_reduce_sub intrinsic,
327- // so mimic the behaviour by negating the second operand
328- if (Opcode == Instruction::Sub) {
329- BinOpVal = Builder.CreateSub (Constant::getNullValue (BinOpVal->getType ()),
330- BinOpVal);
331- Opcode = Instruction::Add;
332- }
333-
334- assert (Opcode == Instruction::Add && " Unhandled partial reduction opcode" );
335-
336327 Type *RetTy = PhiVal->getType ();
337328
338329 CallInst *V = Builder.CreateIntrinsic (
You can’t perform that action at this time.
0 commit comments