+ case Intrinsic::exp: {
+ static Constant *expFCache = 0;
+ static Constant *expDCache = 0;
+ static Constant *expLDCache = 0;
+ ReplaceFPIntrinsicWithCall(CI, expFCache, expDCache, expLDCache,
+ "expf", "exp", "expl");
+ break;
+ }
+ case Intrinsic::exp2: {
+ static Constant *exp2FCache = 0;
+ static Constant *exp2DCache = 0;
+ static Constant *exp2LDCache = 0;
+ ReplaceFPIntrinsicWithCall(CI, exp2FCache, exp2DCache, exp2LDCache,
+ "exp2f", "exp2", "exp2l");
+ break;
+ }
+ case Intrinsic::pow: {
+ static Constant *powFCache = 0;
+ static Constant *powDCache = 0;
+ static Constant *powLDCache = 0;
+ ReplaceFPIntrinsicWithCall(CI, powFCache, powDCache, powLDCache,
+ "powf", "pow", "powl");
+ break;
+ }
+ case Intrinsic::flt_rounds:
+ // Lower to "round to the nearest"
+ if (CI->getType() != Type::VoidTy)
+ CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
+ break;