[TailDuplicator] Don't constrain register classes due to debug instructions
authorMikael Holmen <mikael.holmen@ericsson.com>
Fri, 21 Apr 2023 09:30:28 +0000 (11:30 +0200)
committerMikael Holmen <mikael.holmen@ericsson.com>
Wed, 26 Apr 2023 06:17:42 +0000 (08:17 +0200)
commitf7bee65728becbfbf82ba46fd0726f13f43b0e33
treefe15ece48561415fa05f1e19de6131c3a8b3ddc1
parent5acaf9f1177fa3a62c1255b3435740c5c1f98d32
[TailDuplicator] Don't constrain register classes due to debug instructions

If cloning a DBG_VALUE instruction, register uses in that instruction could
lead to constraining of a virtual register that would not happen if the
DBG_VALUE was not present at all. This lead to different code with/without
debug info.

Now we only do that register class constraining if we dealing with a non
debug instruction.

Differential Revision: https://reviews.llvm.org/D149146
llvm/lib/CodeGen/TailDuplicator.cpp
llvm/test/CodeGen/AArch64/tail-duplicate-debug-variance.mir [new file with mode: 0644]