[GlobalISel] Add G_BUILD_VECTOR[_TRUNC] to CSE
authorDiana Picus <Diana-Magda.Picus@amd.com>
Wed, 4 Jan 2023 10:58:58 +0000 (11:58 +0100)
committerDiana Picus <Diana-Magda.Picus@amd.com>
Thu, 5 Jan 2023 09:15:31 +0000 (10:15 +0100)
commit6ee4f253b2c4b5f86bf69936c704e8537ecc921e
treea8639af332c1629337f30e5ee555a92165356c08
parent22924bd48dcea4ba23caccedbb366fd2b4e66e30
[GlobalISel] Add G_BUILD_VECTOR[_TRUNC] to CSE

Add G_BUILD_VECTOR and G_BUILD_VECTOR_TRUNC to the list of opcodes in
`shouldCSEOpc`. This simplifies the code generated for vector splats.

Differential Revision: https://reviews.llvm.org/D140965
llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/combine-udiv.ll
llvm/test/CodeGen/AArch64/GlobalISel/combine-udiv.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-fp-arith.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-min-max.mir
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizer-combiner-mulo-zero.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-build-vector-splat.mir
llvm/unittests/CodeGen/GlobalISel/CSETest.cpp