Commit ac5868b
committed
[GlobalOpt] Don't query TTI on a llvm.memcpy declaration.
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.1 parent 8b284dc commit ac5868b
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2186 | 2186 | | |
2187 | 2187 | | |
2188 | 2188 | | |
2189 | | - | |
2190 | | - | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
2191 | 2193 | | |
2192 | 2194 | | |
2193 | 2195 | | |
| |||
0 commit comments