[llvm] [ARM] Stop gluing FP comparisons to FMSTAT (PR #116676)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 07:21:44 PST 2024


s-barannikov wrote:

The issue is that FPSCR gets spilled and restored, and the load and the store have incorrect addressing mode:

```
*** Bad machine code: Incorrect AddrMode Imm for instruction ***
- function:    c
- basic block: %bb.0 entry (0x5bd7d62ac2e0)
- instruction: VSTR_FPSCR_NZCVQC_off $fpscr_nzcv, $sp, 1, 14, $noreg :: (store (s32) into %stack.0)

*** Bad machine code: Incorrect AddrMode Imm for instruction ***
- function:    c
- basic block: %bb.0 entry (0x5bd7d62ac2e0)
- instruction: $fpscr_nzcv = VLDR_FPSCR_NZCVQC_off $sp, 1, 14, $noreg :: (load (s32) from %stack.0)
```

This can be fixed by handling the corresponding register class in `TRI::getCrossCopyRegClass`, but I'll need some time investigate it more thoroughly. Reverting for now.


https://github.com/llvm/llvm-project/pull/116676


More information about the llvm-commits mailing list