Files
clang-p2996/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Sanjay Patel d5f8878a6e [InstCombine] canonicalize insertelement order based on index
This puts lower insert indexes before higher. This is independent
of endian, so it requires an adjustment to a fold added with
4446f71ce3, but it makes that fold more robust.
That's also where this patch was suggested - D139668.

This matches what we already do in DAGCombiner, but there is one
more constraint because there's an existing canonicalization for
insert-of-scalar-constant. I'm not sure if that is still needed,
so it may be adjusted/removed as a follow-up.
2022-12-18 07:08:48 -05:00

125 KiB