Page MenuHomePhabricator

[AArch64][GlobalISel] Add post-legalizer lowering for NEON vector fcmps
ClosedPublic

Authored by paquette on May 3 2021, 12:28 PM.

Details

Summary

This is roughly equivalent to the floating point portion of AArch64TargetLowering::LowerVSETCC. Main part that's missing is the v4s16 bit.

This also adds helpers equivalent to EmitVectorComparison, and changeVectorFPCCToAArch64CC. This moves changeFCMPPredToAArch64CC out of the selector into AArch64GlobalISelUtils for the sake of code reuse.

This is done in post-legalizer lowering with pseudos to simplify selection. The imported patterns end up handling selection for us this way.

Diff Detail

Event Timeline

paquette created this revision.May 3 2021, 12:28 PM
paquette requested review of this revision.May 3 2021, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2021, 12:28 PM
aemerson added inline comments.May 5 2021, 11:54 AM
llvm/lib/Target/AArch64/AArch64Combine.td
183

apply functions don't need to return a value.

llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
859

Should assert that the type is a vector.

916

Why not just return the lambda directly instead of via Func?

948

When can this be None? Is there missing support that needs to be added later, or should this be more of an assert?

paquette added inline comments.May 7 2021, 4:57 PM
llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
948

Yeah, actually, I couldn't find any place where this actually makes sense in SDAG after a second look. This can probably all be simpler.

paquette updated this revision to Diff 344103.May 10 2021, 10:09 AM

Address comments

aemerson accepted this revision.May 10 2021, 3:05 PM

LGTM.

This revision is now accepted and ready to land.May 10 2021, 3:05 PM
This revision was landed with ongoing or failed builds.May 10 2021, 3:42 PM
This revision was automatically updated to reflect the committed changes.