@@ -448,8 +448,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
448
448
case Builtin::BI__builtin_cosf16:
449
449
case Builtin::BI__builtin_cosl:
450
450
case Builtin::BI__builtin_cosf128:
451
- assert (getContext ().getLangOpts ().FastMath &&
452
- " cir.cos is only expected under -ffast-math" );
451
+ assert (!MissingFeatures::fastMathFlags ());
453
452
return buildUnaryFPBuiltin<mlir::cir::CosOp>(*this , *E);
454
453
455
454
case Builtin::BIexp:
@@ -460,8 +459,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
460
459
case Builtin::BI__builtin_expf16:
461
460
case Builtin::BI__builtin_expl:
462
461
case Builtin::BI__builtin_expf128:
463
- assert (getContext ().getLangOpts ().FastMath &&
464
- " cir.exp is only expected under -ffast-math" );
462
+ assert (!MissingFeatures::fastMathFlags ());
465
463
return buildUnaryFPBuiltin<mlir::cir::ExpOp>(*this , *E);
466
464
467
465
case Builtin::BIexp2:
@@ -472,8 +470,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
472
470
case Builtin::BI__builtin_exp2f16:
473
471
case Builtin::BI__builtin_exp2l:
474
472
case Builtin::BI__builtin_exp2f128:
475
- assert (getContext ().getLangOpts ().FastMath &&
476
- " cir.exp2 is only expected under -ffast-math" );
473
+ assert (!MissingFeatures::fastMathFlags ());
477
474
return buildUnaryFPBuiltin<mlir::cir::Exp2Op>(*this , *E);
478
475
479
476
case Builtin::BIfabs:
@@ -540,8 +537,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
540
537
case Builtin::BI__builtin_fmod:
541
538
case Builtin::BI__builtin_fmodf:
542
539
case Builtin::BI__builtin_fmodl:
543
- assert (getContext ().getLangOpts ().FastMath &&
544
- " cir.fmod is only expected under -ffast-math" );
540
+ assert (!MissingFeatures::fastMathFlags ());
545
541
return buildBinaryFPBuiltin<mlir::cir::FModOp>(*this , *E);
546
542
547
543
case Builtin::BI__builtin_fmodf16:
@@ -556,8 +552,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
556
552
case Builtin::BI__builtin_logf16:
557
553
case Builtin::BI__builtin_logl:
558
554
case Builtin::BI__builtin_logf128:
559
- assert (getContext ().getLangOpts ().FastMath &&
560
- " cir.log is only expected under -ffast-math" );
555
+ assert (!MissingFeatures::fastMathFlags ());
561
556
return buildUnaryFPBuiltin<mlir::cir::LogOp>(*this , *E);
562
557
563
558
case Builtin::BIlog10:
@@ -568,8 +563,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
568
563
case Builtin::BI__builtin_log10f16:
569
564
case Builtin::BI__builtin_log10l:
570
565
case Builtin::BI__builtin_log10f128:
571
- assert (getContext ().getLangOpts ().FastMath &&
572
- " cir.log10 is only expected under -ffast-math" );
566
+ assert (!MissingFeatures::fastMathFlags ());
573
567
return buildUnaryFPBuiltin<mlir::cir::Log10Op>(*this , *E);
574
568
575
569
case Builtin::BIlog2:
@@ -580,8 +574,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
580
574
case Builtin::BI__builtin_log2f16:
581
575
case Builtin::BI__builtin_log2l:
582
576
case Builtin::BI__builtin_log2f128:
583
- assert (getContext ().getLangOpts ().FastMath &&
584
- " cir.log2 is only expected under -ffast-math" );
577
+ assert (!MissingFeatures::fastMathFlags ());
585
578
return buildUnaryFPBuiltin<mlir::cir::Log2Op>(*this , *E);
586
579
587
580
case Builtin::BInearbyint:
@@ -599,8 +592,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
599
592
case Builtin::BI__builtin_pow:
600
593
case Builtin::BI__builtin_powf:
601
594
case Builtin::BI__builtin_powl:
602
- assert (getContext ().getLangOpts ().FastMath &&
603
- " cir.pow is only expected under -ffast-math" );
595
+ assert (!MissingFeatures::fastMathFlags ());
604
596
return RValue::get (
605
597
buildBinaryMaybeConstrainedFPBuiltin<mlir::cir::PowOp>(*this , *E));
606
598
@@ -636,8 +628,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
636
628
case Builtin::BI__builtin_sinf16:
637
629
case Builtin::BI__builtin_sinl:
638
630
case Builtin::BI__builtin_sinf128:
639
- assert (getContext ().getLangOpts ().FastMath &&
640
- " cir.sin is only expected under -ffast-math" );
631
+ assert (!MissingFeatures::fastMathFlags ());
641
632
return buildUnaryFPBuiltin<mlir::cir::SinOp>(*this , *E);
642
633
643
634
case Builtin::BIsqrt:
@@ -648,8 +639,7 @@ RValue CIRGenFunction::buildBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
648
639
case Builtin::BI__builtin_sqrtf16:
649
640
case Builtin::BI__builtin_sqrtl:
650
641
case Builtin::BI__builtin_sqrtf128:
651
- assert (getContext ().getLangOpts ().FastMath &&
652
- " cir.sqrt is only expected under -ffast-math" );
642
+ assert (!MissingFeatures::fastMathFlags ());
653
643
return buildUnaryFPBuiltin<mlir::cir::SqrtOp>(*this , *E);
654
644
655
645
case Builtin::BItrunc:
0 commit comments