changeset 191:d6e74ee136ee

avoid SEGV in SelectionDAGISel
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 10 Aug 2020 20:54:02 +0900
parents b1364f705114
children d7606dcf6fce
files llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Sat Jun 06 13:15:35 2020 +0900
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Mon Aug 10 20:54:02 2020 +0900
@@ -1549,6 +1549,9 @@
           // If the call was emitted as a tail call, we're done with the block.
           // We also need to delete any previously emitted instructions.
           if (HadTailCall) {
+#ifndef noCbC
+            if (Fn.getReturnType()->is__CodeTy()) break;
+#endif // noCbC
             FastIS->removeDeadCode(SavedInsertPt, FuncInfo->MBB->end());
             --BI;
             break;