[PATCH] D158839: [SDAG] Add SimplifyDemandedBits support for ISD::SPLAT_VECTOR

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 05:12:24 PDT 2023


luke created this revision.
luke added reviewers: reames, craig.topper, RKSimon, paulwalker-arm, david-arm, sdesmalen.
Herald added subscribers: asb, sunshaoce, pmatos, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, MaskRay.
Herald added a project: LLVM.

This improves some cases where a splat_vector uses a build_pair that can be
simplified, e.g:

(shl x:i64, splat_vector (build_pair x1:i32, x2:i32))

shl only demands the bottom 6 bits, so this patch allows it to simplify it to:

(shl x:i64, splat_vector (build_pair x1:i32, undef:i32))

Which in turn improves some cases where a splat_vector_parts is lowered on
RV32.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158839

Files:
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/AArch64/sve-fixed-length-fp-select.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-int-select.ll
  llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-select.ll
  llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-select.ll
  llvm/test/CodeGen/RISCV/rvv/mscatter-combine.ll
  llvm/test/CodeGen/RISCV/rvv/vrol-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/vror-sdnode.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158839.553443.patch
Type: text/x-patch
Size: 33146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230825/d495e6bb/attachment-0001.bin>


More information about the llvm-commits mailing list