[PATCH] D129150: [DAG] Canonicalize non-inlane shuffle -> AND if all non-inlane referenced elements are known zero (WIP)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 09:50:43 PDT 2022


RKSimon created this revision.
RKSimon added reviewers: spatel, deadalnix, craig.topper, dmgreen.
Herald added subscribers: jsji, StephenFan, ecnelises, pengfei, hiraditya.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a project: LLVM.

As mentioned on D127115 <https://reviews.llvm.org/D127115>, this is a WIP patch that attempts to recognise shuffle masks that could be simplified to a AND mask - we already have a similar transform that will fold AND -> 'clear mask' shuffle, but this patch handles cases where the referenced elements are not from the same lane indices but are known to be zero.

I'll get back to this ASAP, but I wanted to put this up for reference to help @deadalnix track the outstanding regressions in D127115 <https://reviews.llvm.org/D127115>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129150

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/test/CodeGen/AArch64/build-vector-extract.ll
  llvm/test/CodeGen/AArch64/neon-bitwise-instructions.ll
  llvm/test/CodeGen/ARM/vector-DAGCombine.ll
  llvm/test/CodeGen/X86/avx512-mask-op.ll
  llvm/test/CodeGen/X86/combine-sra.ll
  llvm/test/CodeGen/X86/combine-srl.ll
  llvm/test/CodeGen/X86/pr45563-2.ll
  llvm/test/CodeGen/X86/pr45833.ll
  llvm/test/CodeGen/X86/sad.ll
  llvm/test/CodeGen/X86/shrink_vmul.ll
  llvm/test/CodeGen/X86/vec-strict-128-fp16.ll
  llvm/test/CodeGen/X86/vector-fshl-128.ll
  llvm/test/CodeGen/X86/vector-fshr-128.ll
  llvm/test/CodeGen/X86/vector-shuffle-128-v4.ll
  llvm/test/CodeGen/X86/vector-shuffle-512-v8.ll
  llvm/test/CodeGen/X86/vselect-constants.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129150.442339.patch
Type: text/x-patch
Size: 39796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220705/b4104258/attachment-0001.bin>


More information about the llvm-commits mailing list