[X86] Pre-truncate gather/scatter indices that have element sizes larger than 64...
authorCraig Topper <craig.topper@intel.com>
Thu, 16 Nov 2017 20:23:22 +0000 (20:23 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 16 Nov 2017 20:23:22 +0000 (20:23 +0000)
commite85ff4f732627c664778a3d07adbb8106769d92d
tree1750984fddefe22fbd2349e1eb30aa96ce580de1
parent04be793cecd837599243bc9439357529d8bea2ae
[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.

llvm-svn: 318452
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/masked_gather_scatter.ll