[llvm] [AArch64][GISel] Assign registers into FPR if they feed into FP instructions indirectly via PHI (PR #94618)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 03:37:38 PDT 2024
tschuett wrote:
```
// Check if that load feeds fp instructions.
// In that case, we want the default mapping to be on FPR
// instead of blind map every scalar to GPR.
if (any_of(MRI.use_nodbg_instructions(MI.getOperand(0).getReg()),
[&](const MachineInstr &UseMI) {
// If we have at least one direct use in a FP instruction,
// assume this was a floating point load in the IR. If it was
// not, we would have had a bitcast before reaching that
// instruction.
if (isa<GPHi>(&UseMI)
if (isPHIWithFPContraints(UseMI))
return true;
//
// Int->FP conversion operations are also captured in
// onlyDefinesFP().
return onlyUsesFP(UseMI, MRI, TRI) ||
onlyDefinesFP(UseMI, MRI, TRI);
}))
OpRegBankIdx[0] = PMI_FirstFPR;
break;
```
https://github.com/llvm/llvm-project/pull/94618
More information about the llvm-commits
mailing list