[llvm] r343428 - [X86] Change an llvm_unreachable to a report_fatal_error so the optimizer will stop making us reach the other report_fatal_error in this function.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 30 16:43:30 PDT 2018


Author: ctopper
Date: Sun Sep 30 16:43:30 2018
New Revision: 343428

URL: http://llvm.org/viewvc/llvm-project?rev=343428&view=rev
Log:
[X86] Change an llvm_unreachable to a report_fatal_error so the optimizer will stop making us reach the other report_fatal_error in this function.

There's a conditional report_fatal_error just above this llvm_unreachable. The optimizer when seeing the unreachable removes the conditional and just makes any other error trigger the existing report_fatal_error.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=343428&r1=343427&r2=343428&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Sun Sep 30 16:43:30 2018
@@ -3119,7 +3119,7 @@ void X86InstrInfo::copyPhysReg(MachineBa
 
   LLVM_DEBUG(dbgs() << "Cannot copy " << RI.getName(SrcReg) << " to "
                     << RI.getName(DestReg) << '\n');
-  llvm_unreachable("Cannot emit physreg copy instruction");
+  report_fatal_error("Cannot emit physreg copy instruction");
 }
 
 bool X86InstrInfo::isCopyInstrImpl(const MachineInstr &MI,




More information about the llvm-commits mailing list