[MachineCopyPropagation] In isNopCopy, check the destination registers match in addit...
authorCraig Topper <craig.topper@intel.com>
Tue, 1 Sep 2020 19:14:32 +0000 (12:14 -0700)
committerCraig Topper <craig.topper@intel.com>
Tue, 1 Sep 2020 19:44:32 +0000 (12:44 -0700)
commit4783e2c9c603ed6aeacc76bb1177056a9d307bd1
tree9bbabfbbdec5ab8ffddad5791fd841edbc6840d5
parent96f0b57568c3047fde0c1e4b4f52401ce34f2da2
[MachineCopyPropagation] In isNopCopy, check the destination registers match in addition to the source registers.

Previously if the source match we asserted that the destination
matched. But GPR <-> mask register copies on X86 can violate this
since we use the same K-registers for multiple sizes.

Fixes this ISPC issue https://github.com/ispc/ispc/issues/1851

Differential Revision: https://reviews.llvm.org/D86507
llvm/lib/CodeGen/MachineCopyPropagation.cpp
llvm/test/CodeGen/X86/machine-cp-mask-reg.mir [new file with mode: 0644]