[TLI] SimplifyMultipleUseDemandedBits - remove insert_subvector(undef, x, 0) fold
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 Feb 2023 09:55:03 +0000 (09:55 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 6 Feb 2023 09:55:11 +0000 (09:55 +0000)
commitf7b10467b63f09ab74e67d4002b3e11601091882
tree851848d8be2fa8e8637f31e4506777261b51440f
parent6c7e047b40613729a6fe250d9997d86a04f0e000
[TLI] SimplifyMultipleUseDemandedBits - remove insert_subvector(undef, x, 0) fold

SimplifyMultipleUseDemandedBits shouldn't be creating general nodes on the fly, it should mainly just peek through them (although we do currently allow creation of new bitcasts and constant folding).

This is mostly a win - by avoiding new nodes we avoid a lot of hasOneUse limitations inside x86 shuffle combining - the main regressions I've noticed are where we've ended up with multiple insert_subvector(undef, x, 0) nodes, widening x to different vector widths - that should hopefully be improved when we remove the last of the vector widening from combineX86ShufflesRecursively for Issue #45319
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/vecreduce-and-legalization.ll
llvm/test/CodeGen/X86/horizontal-sum.ll
llvm/test/CodeGen/X86/oddshuffles.ll
llvm/test/CodeGen/X86/vector-interleaved-load-i32-stride-5.ll
llvm/test/CodeGen/X86/vector-interleaved-store-i32-stride-5.ll
llvm/test/CodeGen/X86/vector-interleaved-store-i32-stride-7.ll
llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-3.ll
llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-6.ll
llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-7.ll
llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-8.ll