[X86] Prevent shuffle combining from creating an identical X86ISD::SHUF128.
authorCraig Topper <craig.topper@intel.com>
Fri, 4 Sep 2020 20:52:26 +0000 (13:52 -0700)
committerCraig Topper <craig.topper@intel.com>
Fri, 4 Sep 2020 21:12:49 +0000 (14:12 -0700)
commit35b35a373d013df8e80c0c9840c085aa6a79c4dc
tree6d9a0ea6c9073cf455a11548a3497ffbb8d3214b
parent35c6d56c0437f79b0f472b22e7353727a433881c
[X86] Prevent shuffle combining from creating an identical X86ISD::SHUF128.

This can cause an infinite loop if SimplifiedDemandedElts asks
for the node to replace itself.

A similar protection exists in other places in shuffle combining.

Fixes ISPC https://github.com/ispc/ispc/issues/1864
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-shuffle-512-v16.ll