Skip to content
Commit d5f8878a authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[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.
parent 9ec5b512
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment