[CodeGen] Fix the bug of machine sink
authorLuo, Yuanke <yuanke.luo@intel.com>
Wed, 15 Jun 2022 11:03:18 +0000 (19:03 +0800)
committerLuo, Yuanke <yuanke.luo@intel.com>
Wed, 15 Jun 2022 15:35:52 +0000 (23:35 +0800)
commit16547f9fbbd56c7b8256b6eea1ccd8b1547ef4e5
tree16828fd91f9f44afa1c5e2f2770937c03c8ca928
parent929e60b6bd2f463321b6e98db85a3d9c89236996
[CodeGen] Fix the bug of machine sink

The use operand may be undefined. In that case we can just continue to
check the next operand since it won't increase register pressure.

Differential Revision: https://reviews.llvm.org/D127848
llvm/lib/CodeGen/MachineSink.cpp
llvm/test/CodeGen/X86/sink-down-undef-use.mir [new file with mode: 0644]