@@ -1333,36 +1333,31 @@ Value *llvm::createSimpleReduction(IRBuilderBase &Builder, Value *Src,
1333
1333
}
1334
1334
1335
1335
Value *llvm::createSimpleReduction (VectorBuilder &VBuilder, Value *Src,
1336
- const RecurrenceDescriptor &Desc) {
1337
- RecurKind Kind = Desc.getRecurrenceKind ();
1336
+ RecurKind Kind, FastMathFlags FMFs) {
1338
1337
assert (!RecurrenceDescriptor::isAnyOfRecurrenceKind (Kind) &&
1339
1338
!RecurrenceDescriptor::isFindLastIVRecurrenceKind (Kind) &&
1340
1339
" AnyOf or FindLastIV reductions are not supported." );
1341
1340
Intrinsic::ID Id = getReductionIntrinsicID (Kind);
1342
1341
auto *SrcTy = cast<VectorType>(Src->getType ());
1343
1342
Type *SrcEltTy = SrcTy->getElementType ();
1344
- Value *Iden = getRecurrenceIdentity (Kind, SrcEltTy, Desc. getFastMathFlags () );
1343
+ Value *Iden = getRecurrenceIdentity (Kind, SrcEltTy, FMFs );
1345
1344
Value *Ops[] = {Iden, Src};
1346
1345
return VBuilder.createSimpleReduction (Id, SrcTy, Ops);
1347
1346
}
1348
1347
1349
- Value *llvm::createOrderedReduction (IRBuilderBase &B,
1350
- const RecurrenceDescriptor &Desc,
1348
+ Value *llvm::createOrderedReduction (IRBuilderBase &B, RecurKind Kind,
1351
1349
Value *Src, Value *Start) {
1352
- assert ((Desc.getRecurrenceKind () == RecurKind::FAdd ||
1353
- Desc.getRecurrenceKind () == RecurKind::FMulAdd) &&
1350
+ assert ((Kind == RecurKind::FAdd || Kind == RecurKind::FMulAdd) &&
1354
1351
" Unexpected reduction kind" );
1355
1352
assert (Src->getType ()->isVectorTy () && " Expected a vector type" );
1356
1353
assert (!Start->getType ()->isVectorTy () && " Expected a scalar type" );
1357
1354
1358
1355
return B.CreateFAddReduce (Start, Src);
1359
1356
}
1360
1357
1361
- Value *llvm::createOrderedReduction (VectorBuilder &VBuilder,
1362
- const RecurrenceDescriptor &Desc,
1358
+ Value *llvm::createOrderedReduction (VectorBuilder &VBuilder, RecurKind Kind,
1363
1359
Value *Src, Value *Start) {
1364
- assert ((Desc.getRecurrenceKind () == RecurKind::FAdd ||
1365
- Desc.getRecurrenceKind () == RecurKind::FMulAdd) &&
1360
+ assert ((Kind == RecurKind::FAdd || Kind == RecurKind::FMulAdd) &&
1366
1361
" Unexpected reduction kind" );
1367
1362
assert (Src->getType ()->isVectorTy () && " Expected a vector type" );
1368
1363
assert (!Start->getType ()->isVectorTy () && " Expected a scalar type" );
0 commit comments