[FLANG][NFCI]De-duplicate code in SimplifyIntrinsics
authorMats Petersson <mats.petersson@arm.com>
Fri, 19 Aug 2022 16:45:35 +0000 (17:45 +0100)
committerMats Petersson <mats.petersson@arm.com>
Fri, 2 Sep 2022 09:49:25 +0000 (10:49 +0100)
commit43159b5808a7de2301be932c666816b4b7b93faf
treeb9863c4e04a5ff1fa047d08f712a3c7f6f16a756
parent10dfcf1f8799c5c6720c3ae033ec17eb8a45bb95
[FLANG][NFCI]De-duplicate code in SimplifyIntrinsics

This removes a bunch of duplicated code, by adding an intermediate
function simplifyReduction that takes a std::function argument
for the actual replacement of the code.

No functional change intended.

Reviewed By: vzakhari

Differential Revision: https://reviews.llvm.org/D132588
flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp