[llvm] [AArch64][GlobalISel] Be more precise in RegBankSelect for s/uitofp (PR #154489)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 01:32:24 PDT 2025


================
@@ -139,6 +139,10 @@ class AArch64RegisterBankInfo final : public AArch64GenRegisterBankInfo {
   bool onlyDefinesFP(const MachineInstr &MI, const MachineRegisterInfo &MRI,
                      const TargetRegisterInfo &TRI, unsigned Depth = 0) const;
 
+  /// \returns true if \p MI can take both fpr and gpr uses, but prefers fp.
+  bool prefersFPUse(const MachineInstr &MI, const MachineRegisterInfo &MRI,
+                    const TargetRegisterInfo &TRI, unsigned Depth = 0) const;
----------------
arsenm wrote:

```suggestion
                    const AArch64RegisterInfo &TRI, unsigned Depth = 0) const;
```
TRI should probably just be a field in the RegisterBankInfo 

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


More information about the llvm-commits mailing list