BranchFolder: Fix invalid undef flags after merge.
authorMatthias Braun <matze@braunis.de>
Tue, 20 Sep 2016 01:14:42 +0000 (01:14 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 20 Sep 2016 01:14:42 +0000 (01:14 +0000)
commit4040c0f4ec135c18e723c1807ec0d1dbbb4cf3fa
treec317ef21d8f95e0cb78e0f23f66288835499e75e
parentd0a238fc6b5472e6e8bd69a083b3e6dd4a43bcbc
BranchFolder: Fix invalid undef flags after merge.

It is legal to merge instructions with different undef flags; However we
must drop the undef flag from the merged instruction if it isn't present
everywhere.

This fixes http://llvm.org/PR30199

llvm-svn: 281957
llvm/lib/CodeGen/BranchFolding.cpp
llvm/test/CodeGen/X86/branchfolding-undef.mir [new file with mode: 0644]