[PATCH] D126782: [AArch64] Look through bitcast when looking for extract_high subvector

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 07:48:11 PDT 2022


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, samtebbs, jaykang10, sdesmalen.
Herald added subscribers: steven.zhang, hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

Since D61806 <https://reviews.llvm.org/D61806>, DAGCombiner has folded `subvector_extract(bitcast(..))` to `bitcast(subvector_extract(..))`, which would place a bitcast between a subvector_extract and the operation that could be converted to a "high" neon instruction (like smull2).  This adds better matching for the subvector_extract, through the tablegen extract_high PatFrags to optionally skip the bitcast under little ending, still matchings an extract of the high half of the input vector.

I didn't update the extract_high of a duplicate patterns, as the ComplexPattern need names operands. I did add a extract_high_dup_v8i16 PatFrag to abstract away the common code, which can be extended in a future patch.


https://reviews.llvm.org/D126782

Files:
  llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  llvm/lib/Target/AArch64/AArch64InstrFormats.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/test/CodeGen/AArch64/highextractbitcast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126782.433394.patch
Type: text/x-patch
Size: 29139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220601/3fb23026/attachment.bin>


More information about the llvm-commits mailing list