mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
[LoopVectorizer] Enable support for floating-point subtraction reductions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -5136,7 +5136,7 @@ LoopVectorizationLegality::isReductionInstr(Instruction *I,
|
||||
ReductionKind Kind,
|
||||
ReductionInstDesc &Prev) {
|
||||
bool FP = I->getType()->isFloatingPointTy();
|
||||
bool FastMath = (FP && I->isCommutative() && I->isAssociative());
|
||||
bool FastMath = FP && I->hasUnsafeAlgebra();
|
||||
switch (I->getOpcode()) {
|
||||
default:
|
||||
return ReductionInstDesc(false, I);
|
||||
@@ -5158,6 +5158,7 @@ LoopVectorizationLegality::isReductionInstr(Instruction *I,
|
||||
return ReductionInstDesc(Kind == RK_IntegerXor, I);
|
||||
case Instruction::FMul:
|
||||
return ReductionInstDesc(Kind == RK_FloatMult && FastMath, I);
|
||||
case Instruction::FSub:
|
||||
case Instruction::FAdd:
|
||||
return ReductionInstDesc(Kind == RK_FloatAdd && FastMath, I);
|
||||
case Instruction::FCmp:
|
||||
|
||||
Reference in New Issue
Block a user