[MergeFuncs] Don't merge shufflevectors with different masks
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 1 May 2020 20:28:59 +0000 (22:28 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 2 May 2020 08:21:14 +0000 (10:21 +0200)
commit60e9ee16b4a44166e5ceda44acb16f098b19cab4
treeee971b42813793ec11b3a4928e789fb800cd9894
parentff6a0b6a8ee74693e9711973028a8a327adf9cd5
[MergeFuncs] Don't merge shufflevectors with different masks

When the shufflevector mask operand was converted into special
instruction data, the FunctionComparator was not updated to
account for this. As such, MergeFuncs will happily merge
shufflevectors with different masks.

This fixes https://bugs.llvm.org/show_bug.cgi?id=45773.

Differential Revision: https://reviews.llvm.org/D79261
llvm/lib/Transforms/Utils/FunctionComparator.cpp
llvm/test/Transforms/MergeFunc/shufflevector.ll [new file with mode: 0644]