@@ -526,16 +526,17 @@ inline KnownFPClass computeKnownFPClass(
526
526
}
527
527
528
528
// / Wrapper to account for known fast math flags at the use instruction.
529
- inline KnownFPClass computeKnownFPClass ( const Value *V, FastMathFlags FMF,
530
- FPClassTest InterestedClasses ,
531
- unsigned Depth ,
532
- const SimplifyQuery &SQ) {
529
+ inline KnownFPClass
530
+ computeKnownFPClass ( const Value *V, const APInt &DemandedElts ,
531
+ FastMathFlags FMF, FPClassTest InterestedClasses ,
532
+ unsigned Depth, const SimplifyQuery &SQ) {
533
533
if (FMF.noNaNs ())
534
534
InterestedClasses &= ~fcNan;
535
535
if (FMF.noInfs ())
536
536
InterestedClasses &= ~fcInf;
537
537
538
- KnownFPClass Result = computeKnownFPClass (V, InterestedClasses, Depth, SQ);
538
+ KnownFPClass Result =
539
+ computeKnownFPClass (V, DemandedElts, InterestedClasses, Depth, SQ);
539
540
540
541
if (FMF.noNaNs ())
541
542
Result.KnownFPClasses &= ~fcNan;
@@ -544,6 +545,17 @@ inline KnownFPClass computeKnownFPClass(const Value *V, FastMathFlags FMF,
544
545
return Result;
545
546
}
546
547
548
+ inline KnownFPClass computeKnownFPClass (const Value *V, FastMathFlags FMF,
549
+ FPClassTest InterestedClasses,
550
+ unsigned Depth,
551
+ const SimplifyQuery &SQ) {
552
+ auto *FVTy = dyn_cast<FixedVectorType>(V->getType ());
553
+ APInt DemandedElts =
554
+ FVTy ? APInt::getAllOnes (FVTy->getNumElements ()) : APInt (1 , 1 );
555
+ return computeKnownFPClass (V, DemandedElts, FMF, InterestedClasses, Depth,
556
+ SQ);
557
+ }
558
+
547
559
// / Return true if we can prove that the specified FP value is never equal to
548
560
// / -0.0. Users should use caution when considering PreserveSign
549
561
// / denormal-fp-math.
0 commit comments