[RegUsageInfoCollector] Bugfix for handling of register aliases.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 4 May 2018 07:50:05 +0000 (07:50 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 4 May 2018 07:50:05 +0000 (07:50 +0000)
commit72fe760592bd04dca1f2e5c45f06d03997113ef7
tree23d96fc896af9e3b4ff4a7d4fe45c211c589005c
parent786032c1b764217d003b1fe19013d3e486b626f2
[RegUsageInfoCollector]  Bugfix for handling of register aliases.

Don't assume the alias of a defined reg is always already in the set.

As the test case in https://bugs.llvm.org/show_bug.cgi?id=36587 discovered,
it is wrong to assume that all the aliases of the defined register in the
*current function* is already present in the UsedPhysRegsMask.

This patch changes this so that any definition in the current function of a
phys-reg always results in all its aliases inserted into the set of defined
registers.

Review: Quentin Colombet
https://reviews.llvm.org/D45157

llvm-svn: 331509
llvm/lib/CodeGen/RegUsageInfoCollector.cpp
llvm/test/CodeGen/SystemZ/ipra.ll [new file with mode: 0644]