[PATCH] D28484: SimplifyLibCalls: Replace more unary libcalls with intrinsics
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 14:37:28 PST 2017
davide added inline comments.
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:2127-2137
+ return replaceUnaryCall(CI, Builder, Intrinsic::ceil);
case LibFunc::floor:
+ return replaceUnaryCall(CI, Builder, Intrinsic::floor);
case LibFunc::rint:
+ return replaceUnaryCall(CI, Builder, Intrinsic::rint);
case LibFunc::round:
+ return replaceUnaryCall(CI, Builder, Intrinsic::round);
----------------
Does your code handle double-float shrinking correctly? (just checking)
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:2207-2210
//
// round, roundf, roundl:
// * round(cnst) -> cnst'
//
----------------
This can go away, right? If we lower to an intrinsic we should be able to constant fold it, no? (please add a test to verify)
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:2220-2223
// trunc, truncf, truncl:
// * trunc(cnst) -> cnst'
//
//
----------------
Ditto.
https://reviews.llvm.org/D28484
More information about the llvm-commits
mailing list