I was wondering how instcombine does on the examples in D109236, and we're missing what looks like a basic transform:
inselt (ext X), (ext Y), Index --> ext (inselt X, Y, Index)
https://alive2.llvm.org/ce/z/z2aBu9
If this looks ok, then instcombine can handle the relatively simple tests in the other patch.
So we might want to make those a bit longer to show the power of the more general approach in -aggressive-instcombine.
Move hasOneUse() check above, before matching? Or should be here in light of TODO?