[PATCH] D131503: [DAGCombine] Combine signext_inreg of extract-extend

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 08:49:30 PDT 2022


peterwaller-arm created this revision.
peterwaller-arm added reviewers: david-arm, c-rhodes, DavidTruby, dtemirbulatov, paulwalker-arm.
Herald added subscribers: ecnelises, hiraditya.
Herald added a project: All.
peterwaller-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The outer signext_inreg is redundant in the following:

  Fold (signext_inreg (extract_subvector (zext|anyext|sext iN_value to _) _) from iN)
       -> (extract_subvector (signext iN_value to iM))

Tests are precommitted and clone those by analogy from the AND case in
the same file. Add a negative test to check extension width is handled
correctly.

This patch supersedes D130700 <https://reviews.llvm.org/D130700>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131503

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/extract-subvec-combine.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-masked-gather.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-masked-loads.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-masked-scatter.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-masked-stores.ll
  llvm/test/CodeGen/AArch64/vector-fcvt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131503.451176.patch
Type: text/x-patch
Size: 7801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220809/47a710ab/attachment.bin>


More information about the llvm-commits mailing list