[X86] Pre-truncate gather/scatter indices that have element sizes larger than 64-bits before Legalize.

The wider element type will normally cause legalize to try to split and scalarize the gather/scatter, but we can't handle that. Instead, truncate the index early so the gather/scatter node is insulated from the legalization.

This really shouldn't happen in practice since InstCombine will normalize index types to the same size as pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318452 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed