[llvm] [VectorCombine] Add support for zext/sext/trunc to shuffleToIdentity (PR #92696)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 02:34:38 PDT 2024


================
@@ -754,10 +720,8 @@ define void @trunc(<8 x i64> %a, <8 x i64> %b, ptr %p) {
 
 define <4 x i64> @zext_chain(<4 x i16> %x) {
----------------
artagnon wrote:

Can you kindly verify this? I'm mainly worried about some underlying bug in the algorithm, which could result in correctness issues as opposed to missed optimizations. It seems very strange to me that a single add, but not a chain of adds, is handled. If multiple uses aren't handled, even a single add with identical operands shouldn't be reduced. If a chain of adds and chain of zexts are handled, a combination of the two should be handled automatically. At least that's how my (now abandoned) algorithm worked.

https://github.com/llvm/llvm-project/pull/92696


More information about the llvm-commits mailing list