mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Allow constant folding of ceil function whenever feasible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1186,6 +1186,7 @@ bool llvm::canConstantFoldCallTo(const Function *F) {
|
||||
case Intrinsic::exp:
|
||||
case Intrinsic::exp2:
|
||||
case Intrinsic::floor:
|
||||
case Intrinsic::ceil:
|
||||
case Intrinsic::sqrt:
|
||||
case Intrinsic::pow:
|
||||
case Intrinsic::powi:
|
||||
@@ -1390,6 +1391,8 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID,
|
||||
#endif
|
||||
case Intrinsic::floor:
|
||||
return ConstantFoldFP(floor, V, Ty);
|
||||
case Intrinsic::ceil:
|
||||
return ConstantFoldFP(ceil, V, Ty);
|
||||
}
|
||||
|
||||
if (!TLI)
|
||||
|
Reference in New Issue
Block a user