@@ -1215,7 +1215,7 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn,
1215
1215
assert (Success && " cannot get intrinsic signature" );
1216
1216
1217
1217
NewFn = Intrinsic::getOrInsertDeclaration (F->getParent (), NewID,
1218
- OverloadTys);
1218
+ OverloadTys);
1219
1219
}
1220
1220
return true ;
1221
1221
}
@@ -4956,44 +4956,43 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) {
4956
4956
MTI->setSourceAlignment (Align->getMaybeAlignValue ());
4957
4957
break ;
4958
4958
}
4959
- #define LEGACY_FUNCTION (NAME, A, R, I, D ) \
4960
- case Intrinsic::NAME:
4959
+ #define LEGACY_FUNCTION (NAME, A, R, I, D ) case Intrinsic::NAME:
4961
4960
#include " llvm/IR/ConstrainedOps.def"
4962
- {
4963
- SmallVector<OperandBundleDef, 2 > Bundles;
4964
- unsigned NumMetadataArgs = 0 ;
4961
+ {
4962
+ SmallVector<OperandBundleDef, 2 > Bundles;
4963
+ unsigned NumMetadataArgs = 0 ;
4964
+
4965
+ if (auto RM = getRoundingModeArg (*CI)) {
4966
+ auto CurrentRM = CI->getRoundingMode ();
4967
+ assert (!CurrentRM && " unexpected rounding bundle" );
4968
+ Builder.createFPRoundingBundle (Bundles, RM);
4969
+ ++NumMetadataArgs;
4970
+ }
4965
4971
4966
- if (auto RM = getRoundingModeArg (*CI)) {
4967
- auto CurrentRM = CI->getRoundingMode ();
4968
- assert (!CurrentRM && " unexpected rounding bundle" );
4969
- Builder.createFPRoundingBundle (Bundles, RM );
4970
- ++NumMetadataArgs;
4971
- }
4972
+ if (auto EB = getExceptionBehaviorArg (*CI)) {
4973
+ auto CurrentEB = CI->getExceptionBehavior ();
4974
+ assert (!CurrentEB && " unexpected exception bundle" );
4975
+ Builder.createFPExceptionBundle (Bundles, EB );
4976
+ ++NumMetadataArgs;
4977
+ }
4972
4978
4973
- if (auto EB = getExceptionBehaviorArg (*CI)) {
4974
- auto CurrentEB = CI->getExceptionBehavior ();
4975
- assert (!CurrentEB && " unexpected exception bundle" );
4976
- Builder.createFPExceptionBundle (Bundles, EB);
4977
- ++NumMetadataArgs;
4978
- }
4979
+ SmallVector<Value *, 4 > Args (CI->args ());
4980
+ Args.pop_back_n (NumMetadataArgs);
4981
+ NewCall = Builder.CreateCall (NewFn, Args, Bundles, CI->getName ());
4982
+ NewCall->copyMetadata (*CI);
4983
+ AttributeList Attrs = CI->getAttributes ();
4984
+ NewCall->setAttributes (Attrs);
4985
+ if (isa<FPMathOperator>(CI)) {
4986
+ FastMathFlags FMF = CI->getFastMathFlags ();
4987
+ NewCall->setFastMathFlags (FMF);
4988
+ }
4979
4989
4980
- SmallVector<Value *, 4 > Args (CI->args ());
4981
- Args.pop_back_n (NumMetadataArgs);
4982
- NewCall = Builder.CreateCall (NewFn, Args, Bundles, CI->getName ());
4983
- NewCall->copyMetadata (*CI);
4984
- AttributeList Attrs = CI->getAttributes ();
4985
- NewCall->setAttributes (Attrs);
4986
- if (isa<FPMathOperator>(CI)) {
4987
- FastMathFlags FMF = CI->getFastMathFlags ();
4988
- NewCall->setFastMathFlags (FMF);
4990
+ MemoryEffects ME = MemoryEffects::inaccessibleMemOnly ();
4991
+ auto A = Attribute::getWithMemoryEffects (CI->getContext (), ME);
4992
+ NewCall->addFnAttr (A);
4993
+ NewCall->addFnAttr (Attribute::StrictFP);
4994
+ break ;
4989
4995
}
4990
-
4991
- MemoryEffects ME = MemoryEffects::inaccessibleMemOnly ();
4992
- auto A = Attribute::getWithMemoryEffects (CI->getContext (), ME);
4993
- NewCall->addFnAttr (A);
4994
- NewCall->addFnAttr (Attribute::StrictFP);
4995
- break ;
4996
- }
4997
4996
}
4998
4997
assert (NewCall && " Should have either set this variable or returned through "
4999
4998
" the default case" );
0 commit comments