paulwalker-arm added inline comments.
================ Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:5741-5747 + // (insert_vector _, (extract_vector X, 0), 0) -> X + unsigned IdxN = cast<ConstantInt>(Idx)->getZExtValue(); + Value *X = nullptr; + if (match(SubVec, m_Intrinsic<Intrinsic::experimental_vector_extract>( + m_Value(X), m_Zero())) && + IdxN == 0 && X->getType() == ReturnType) + return X; ---------------- Are you sure this transform is correct? I would have thought the following are safe: ``` (insert_vector X, (extract_vector X, 0), 0) -> X (insert_vector undef, (extract_vector X, 0), 0) -> X ``` when `X->getType() == ReturnType` but nothing else. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101986/new/ https://reviews.llvm.org/D101986 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits