diff options
author | dim <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
commit | 782067d0278612ee75d024b9b135c221c327e9e8 (patch) | |
tree | a6140557876943cdd800ee997c9317283394b22c /lib/CodeGen/MachineCopyPropagation.cpp | |
parent | 6669eceb008a9f13853b330dc0b099d6386fe879 (diff) | |
download | FreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.zip FreeBSD-src-782067d0278612ee75d024b9b135c221c327e9e8.tar.gz |
Vendor import of llvm trunk r238337:
https://llvm.org/svn/llvm-project/llvm/trunk@238337
Diffstat (limited to 'lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r-- | lib/CodeGen/MachineCopyPropagation.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineCopyPropagation.cpp b/lib/CodeGen/MachineCopyPropagation.cpp index 9611122..43c80b7 100644 --- a/lib/CodeGen/MachineCopyPropagation.cpp +++ b/lib/CodeGen/MachineCopyPropagation.cpp @@ -252,7 +252,11 @@ bool MachineCopyPropagation::CopyPropagateBlock(MachineBasicBlock &MBB) { report_fatal_error("MachineCopyPropagation should be run after" " register allocation!"); - if (MO.isDef()) { + // Treat undef use like defs. + // The backends are allowed to do whatever they want with undef value + // and we cannot be sure this register will not be rewritten to break + // some false dependencies for the hardware for instance. + if (MO.isDef() || MO.isUndef()) { Defs.push_back(Reg); continue; } |