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)
commitce9ad757c7034bfa37b00d014755997b27948c96
tree399190ae43c56b56ac984650aa6fa07bdaaf5495
parent8a28b21fde4f78786a264be222aebd69bfc6f514
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.

llvm-svn: 236550
llvm/lib/CodeGen/IfConversion.cpp
llvm/test/CodeGen/ARM/ifcvt-regmask-noreturn.ll [new file with mode: 0644]