[PreISelIntrinsicLowering] Use TLI for correct function
authorNikita Popov <npopov@redhat.com>
Mon, 14 Aug 2023 08:39:05 +0000 (10:39 +0200)
committerTobias Hieta <tobias@hieta.se>
Mon, 21 Aug 2023 07:53:10 +0000 (09:53 +0200)
commit45d5dfbd1f76b1cb0fc7f7a0076599f04262139b
tree08251de09c580a83ce0a4a0e7aaef0efaf7a4d70
parentb89a2ac64f641e8d38fcb15c626b0a9707013bba
[PreISelIntrinsicLowering] Use TLI for correct function

We should query the subtarget of the calling function, not of the
intrinsic.

This probably makes no functional difference (as libcalls are
unlikely to vary across subtargets), but fixes minor compile-time
regressions from unnecessary subtarget instantiations.

Followup to D157567.

Differential Revision: https://reviews.llvm.org/D157848

(cherry picked from commit 66bb7521625826cab6fcc24662c053deee1ef90c)
llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp