[PATCH] D155582: [DAG] More aggressively (extract_vector_elt (build_vector x, y), c) iff element is zero constant
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 04:56:34 PDT 2023
RKSimon created this revision.
RKSimon added reviewers: jaykang10, dmgreen, hassnaa-arm, brad.
Herald added subscribers: atanasyan, jrtc27, fedor.sergeev, hiraditya, sdardis, jyknight.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a project: LLVM.
We currently don't extract vector elements from multi-use build vectors unless TLI.aggressivelyPreferBuildVectorSources accepts them, which seems a little extreme for constant build vectors (especially as under some cases ComputeKnownBits will indirectly extract the data for us).
This is causing a few regressions in some upcoming SimplifyDemandedBits work I'm looking at, all of which just need to know that the element is zero, so I've tweaked the fold to accept zero elements as well, which will typically fold very easily.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155582
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/aarch64-neon-vector-insert-uaddlv.ll
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-ext-loads.ll
llvm/test/CodeGen/Mips/cconv/vector.ll
llvm/test/CodeGen/SPARC/float-constants.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155582.541458.patch
Type: text/x-patch
Size: 17091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230718/b3918470/attachment-0001.bin>
More information about the llvm-commits
mailing list