Commit bad15f9
committed
[LegalizeTypes][RISCV][X86] Legalize FP_ROUND to libcall in SoftPromoteHalfRes_FP_ROUND if the input type is softened.
Previously we created an FP_TO_FP16 and legalized it in SoftenFloatOp_FP_ROUND.
This caused i16 to be sent to call lowering instead of f16. This
results in the ABI not being followed if f16 is supposed to be passed
in a different register than i16.
Looking at the libgcc code for the library function it appears the
value is returned in xmm0 so the X86 test was being miscompiled before.
Fixes #107607.1 parent 4027e2f commit bad15f9
File tree
3 files changed
+825
-2
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen
- RISCV
- X86
3 files changed
+825
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3415 | 3415 | | |
3416 | 3416 | | |
3417 | 3417 | | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
3418 | 3435 | | |
3419 | 3436 | | |
3420 | 3437 | | |
| |||
0 commit comments