[all-commits] [llvm/llvm-project] 2bf473: [GlobalOpt] Don't query TTI on a llvm.memcpy decla...
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Feb 19 10:17:28 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2bf473bd546e65f8fc2f0d5006b8c8ef07259e24
https://github.com/llvm/llvm-project/commit/2bf473bd546e65f8fc2f0d5006b8c8ef07259e24
Author: Craig Topper <craig.topper at sifive.com>
Date: 2025-02-19 (Wed, 19 Feb 2025)
Changed paths:
M llvm/lib/Transforms/IPO/GlobalOpt.cpp
Log Message:
-----------
[GlobalOpt] Don't query TTI on a llvm.memcpy declaration. (#127760)
Querying TTI creates a Subtarget object, but an llvm.memcpy declaration
doesn't have target-cpu and target-feature attributes like functions
with definitions. This can cause a warning to be printed on RISC-V
because the target-abi in the Module requires floating point, but the
subtarget features don't enable floating point. So far we've only seen
this in LTO when an -mcpu is not supplied for the TargetMachine.
To fix this, get TTI for the calling function instead.
Fixes the issue reported here
https://github.com/llvm/llvm-project/issues/69780#issuecomment-2665273161
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list