This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Mark G_FMINNUM/G_FMAXNUM as floating point opcodes
ClosedPublic

Authored by paquette on Aug 17 2021, 5:43 PM.

Details

Summary

We need to ensure that these end up on FPR to allow imported patterns to select them.

This will also ensure that we get good regbank selection when dealing with instructions like G_PHI/G_LOAD/G_STORE which deduce their banks from their uses/users.

Diff Detail

Event Timeline

paquette created this revision.Aug 17 2021, 5:43 PM
paquette requested review of this revision.Aug 17 2021, 5:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2021, 5:43 PM
jroelofs accepted this revision.Aug 17 2021, 5:53 PM

LGTM

llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
428

how about these?

G_FMINNUM_IEEE
G_FMAXNUM_IEEE
G_FMAXIMUM
G_FMINIMUM
G_FCOPYSIGN
G_FCANONICALIZE
G_FMAD
G_FREM
G_FEXP2
This revision is now accepted and ready to land.Aug 17 2021, 5:53 PM
paquette added inline comments.Aug 17 2021, 6:23 PM
llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
428

We should add them, but we can't test it until they're actually legalized.

Regbankselect needs the legalized property on the MachineFunction, so if we have any instructions which aren't legal, we'll get an error. :(