[PATCH] D31196: [InstCombine] fold insertelement of scalar constant into vector of constants
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 14:08:51 PDT 2017
spatel marked 2 inline comments as done.
spatel added a comment.
In https://reviews.llvm.org/D31196#706638, @efriedma wrote:
> Alternatively, we could perform this transform unconditionally: transform (insertelement (insertelement, X, Y, IdxC1), C, IdxC2) -> (insertelement (insertelement X, C, IdxC2), Y, IdxC1), ignoring the actual value of X.
That looks great - we canonicalize harder, the constant folding will happen via the Builder, and it makes the patch cleaner.
More information about the llvm-commits