[PATCH] D156645: [DAGCombiner] Don't reduce BUILD_VECTOR to BITCAST before LegalizeTypes if VT is legal.

Jim Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 30 23:08:12 PDT 2023


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

Targets may lose some optimization opprtunities for certain vector operation
if we reduce BUILD_VECTOR to BITCAST early.

If VT is not legal, reduce BUILD_VECTOR to BITCAST before LegailizeTypes
can get benefit. Because type-legalizer often scalarizes illegal type of vectors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156645

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1down.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-shuffle-vslide1up.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156645.545509.patch
Type: text/x-patch
Size: 10453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230731/4165bd3d/attachment.bin>


More information about the llvm-commits mailing list