[all-commits] [llvm/llvm-project] ad9dcd: Reland "[ARM] Stop gluing FP comparisons to FMSTAT...

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Fri Nov 22 11:30:19 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad9dcd96dc895f57a3747fe68ef455e0bf43c805
      https://github.com/llvm/llvm-project/commit/ad9dcd96dc895f57a3747fe68ef455e0bf43c805
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2024-11-22 (Fri, 22 Nov 2024)

  Changed paths:
    M llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/lib/Target/ARM/ARMInstrVFP.td
    M llvm/lib/Target/ARM/ARMRegisterInfo.td
    M llvm/test/CodeGen/ARM/fcmp-xo.ll
    M llvm/test/CodeGen/ARM/fp16-instructions.ll
    M llvm/test/CodeGen/ARM/fp16-vminmaxnm-safe.ll
    A llvm/test/CodeGen/ARM/fpscr-multi-use.ll
    M llvm/test/CodeGen/ARM/fptosi-sat-scalar.ll
    M llvm/test/CodeGen/ARM/fptoui-sat-scalar.ll
    M llvm/test/CodeGen/ARM/minnum-maxnum-intrinsics.ll
    M llvm/test/CodeGen/ARM/select.ll
    M llvm/test/CodeGen/Thumb2/mve-fmas.ll
    M llvm/test/CodeGen/Thumb2/mve-fptosi-sat-vector.ll
    M llvm/test/CodeGen/Thumb2/mve-fptoui-sat-vector.ll
    M llvm/test/CodeGen/Thumb2/mve-pred-ext.ll
    M llvm/test/CodeGen/Thumb2/mve-vcmpf.ll
    M llvm/test/CodeGen/Thumb2/mve-vcmpfr.ll
    M llvm/test/CodeGen/Thumb2/mve-vcmpfz.ll

  Log Message:
  -----------
  Reland "[ARM] Stop gluing FP comparisons to FMSTAT" (#117248)

Following #116547, this changes the result of `ARMISD::CMPFP*` and the
operand of `ARMISD::FMSTAT` from a special `Glue` type to a normal type.

This change allows comparisons to be CSEd and scheduled around as can be
seen in the test changes.

Note that `ARMISD::FMSTAT` is still glued to its consumer nodes; this is
going to be changed in a separate patch.

This patch also sets `CopyCost` of `cl_FPSCR_NZCV` register class to a
negative value. The reason is the same as for CCR register class: it
makes DAG scheduler and InstrEmitter try to avoid copies of `FPCSR_NZCV`
register to / from virtual registers. Previously, this was not
necessary, since no attempt was made to create copies in the first
place.

`TRI::getCrossCopyRegClass` is modified in a way that prevents DAG
scheduler from copying FPSCR into a virtual register. The register
allocator might need to spill the virtual register, but that only seem
to work in Thumb mode.



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