[FuncSpec] Don't specialise functions with NoDuplicate instructions.
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 17 Jun 2021 13:43:02 +0000 (14:43 +0100)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 21 Jun 2021 08:02:11 +0000 (09:02 +0100)
commit342bbb7832b69cc2adba9acaac0ed2b9bffbe896
tree369375b9fc34f2b015dad9c25432f0e30e74262f
parent225b960cfcc6091e0d51671f446cce7e00d41756
[FuncSpec] Don't specialise functions with NoDuplicate instructions.

getSpecializationCost was returning INT_MAX for a case when specialisation
shouldn't happen, but this wasn't properly checked if specialisation was
forced.

Differential Revision: https://reviews.llvm.org/D104461
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
llvm/test/Transforms/FunctionSpecialization/function-specialization-nodup2.ll