[X86] When removing sign extends from gather/scatter indices, make sure we handle...
authorCraig Topper <craig.topper@intel.com>
Fri, 27 Jul 2018 00:00:30 +0000 (00:00 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 27 Jul 2018 00:00:30 +0000 (00:00 +0000)
commitf7bc55022338a7915ede107fe8cf74065656e114
tree8bafaae16cf13cbcac47153a96af30b4a0eae2aa
parentdd0b344339526b91b1a9703122743d1a4a8f5157
[X86] When removing sign extends from gather/scatter indices, make sure we handle UpdateNodeOperands finding an existing node to CSE with.

If this happens the operands aren't updated and the existing node is returned. Make sure we pass this existing node up to the DAG combiner so that a proper replacement happens. Otherwise we get stuck in an infinite loop with an unoptimized node.

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