This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add DAG-Combine to push bitcasts from floating point loads after DUPLANE128
ClosedPublic

Authored by MattDevereau on Jul 18 2022, 7:52 AM.

Details

Summary

This patch lowers

duplane128(insert_subvector(undef, bitcast(op(128bitsubvec)), 0), 0)

to

bitcast(duplane128(insert_subvector(undef, op(128bitsubvec), 0), 0)).

This enables floating-point loads to match patterns added in https://reviews.llvm.org/D130010

Diff Detail

Event Timeline

MattDevereau created this revision.Jul 18 2022, 7:52 AM
MattDevereau requested review of this revision.Jul 18 2022, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2022, 7:52 AM
Matt added a subscriber: Matt.Jul 18 2022, 11:29 AM
paulwalker-arm added inline comments.Jul 19 2022, 7:12 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
19269–19270

You can use getConstantOperandVal here.

19274

You need to check this is in fact a ISD::BITCAST before accessing its operands.

19275

I guess this is a legacy from the previous patch but can you pick a different name.

19277

Specially this wants to be is128BitVector() because that's the only fixed length vector type supported for the DUPLANE128 operation.

llvm/test/CodeGen/AArch64/sve-ld1r.ll
822–835

As per our conclusion on the precursor patch, these new tests don't offer any value?

MattDevereau added inline comments.Jul 19 2022, 8:32 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
19274

I'm confused as in the old patch we removed it: https://reviews.llvm.org/D129758?vs=on&id=444647#inline-1248238

llvm/test/CodeGen/AArch64/sve-ld1r.ll
822–835

Correct, i was waiting for the parent revision before update this.

MattDevereau marked an inline comment as not done.Jul 19 2022, 8:35 AM
MattDevereau added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
19274

Never mind, I read that wrong, sorry

MattDevereau edited the summary of this revision. (Show Details)
paulwalker-arm accepted this revision.Jul 20 2022, 9:43 AM
paulwalker-arm added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
19283

SubvecVT? Which might have the side effect of fitting on the same line.

This revision is now accepted and ready to land.Jul 20 2022, 9:43 AM
This revision was landed with ongoing or failed builds.Jul 21 2022, 4:00 AM
This revision was automatically updated to reflect the committed changes.