The *LoadExt* legalization handling used to only have one type, the memory type. This forced users to assume that as long as the extload for the memory type was declared legal, and the result type was legal, the whole extload was legal.
However, this isn't always the case. For instance, on X86, with AVX, this is legal:
v4i32 load, zext from v4i8
but this isn't:
v4i64 load, zext from v4i8
Whereas v4i64 is (arguably) legal, even without AVX2.
Keep in mind that this is a draft to give an idea, I mechanically changed the *LoadExt* calls in the generic and X86 parts.
I still need to change other in-tree targets, tell out-of-tree backend maintainers to change their code, and run the testsuite.
Note that the same thing was done a while ago for truncstores (r46140), but I assume no one needed it yet for extloads, so here we go.