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)
commit6ebc207703607521b4cab5b211332a2a86757538
tree0ce94fa2f238b901b96094078f9977fd4f43f38f
parentbbd1c727d17afb1d8327b8a49eb36a716c9af8c0
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.

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