[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 4446f71c, 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.
Loading
Please sign in to comment