Fix IfConverter to handle regmask machine operands.
authorPete Cooper <peter_cooper@apple.com>
Tue, 5 May 2015 18:31:36 +0000 (18:31 +0000)
committerPete Cooper <peter_cooper@apple.com>
Tue, 5 May 2015 18:31:36 +0000 (18:31 +0000)
commit92a55e80b8e6c6861eb7f5bf0d257c4d03c383cb
tree76c2c3c9175faf11c32330464827be2fb10a6614
parent46356f6f6fb1b67c4f585139527a998a65289ce9
Fix IfConverter to handle regmask machine operands.

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@236515 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IfConversion.cpp
test/CodeGen/ARM/ifcvt-regmask-noreturn.ll [new file with mode: 0644]