Fix IfConverter to handle regmask machine operands.
authorPete Cooper <peter_cooper@apple.com>
Tue, 5 May 2015 22:09:41 +0000 (22:09 +0000)
committerPete Cooper <peter_cooper@apple.com>
Tue, 5 May 2015 22:09:41 +0000 (22:09 +0000)
commite064ab5798793706a19af6bc7b04fa57e2c470d4
tree9a93d4a7edd682e0c81f216253ebc44808ca1e7b
parent605f3162583598e166c89724da86bdce8137e2ce
Fix IfConverter to handle regmask machine operands.

Note, this is a recommit of r236515 after fixing an error in r236514.  The buildbot ran fast enough that it picked up r236514 prior to r236515 and threw an error.  r236515 itself ran 'make check' without errors.

Original commit message follows:

A regmask (typically seen on a call) clobbers the set of registers it lists.  The IfConverter, in UpdatePredRedefs, was handling register defs, but not regmasks.

These are slightly different to a def in that we need to add both an implicit use and def to appease the machine verifier.  Otherwise, uses after the if converted call could think they are reading an undefined register.

Reviewed by Matthias Braun and Quentin Colombet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236550 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IfConversion.cpp
test/CodeGen/ARM/ifcvt-regmask-noreturn.ll [new file with mode: 0644]