summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-05-06 04:01:49 +0000
committerCraig Topper <craig.topper@intel.com>2019-05-06 04:01:49 +0000
commitf723490e761c6aae675b7a36b27fbe2452616004 (patch)
tree4c3a570760b80d5fc1f0522ece578d2ffec1db55 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent96d2735045c490bb97b07b217bd1c3f31d160b7c (diff)
downloadbcm5719-llvm-f723490e761c6aae675b7a36b27fbe2452616004.tar.gz
bcm5719-llvm-f723490e761c6aae675b7a36b27fbe2452616004.zip
[SelectionDAG] Replace llvm_unreachable at the end of getCopyFromParts with a report_fatal_error.
Based on PR41748, not all cases are handled in this function. llvm_unreachable is treated as an optimization hint than can prune code paths in a release build. This causes weird behavior when PR41748 is encountered on a release build. It appears to generate an fp_round instruction from the floating point code. Making this a report_fatal_error prevents incorrect optimization of the code and will instead generate a message to file a bug report. llvm-svn: 360008
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 225e0d847dc..bdb5cabe592 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -322,7 +322,7 @@ static SDValue getCopyFromParts(SelectionDAG &DAG, const SDLoc &DL,
return DAG.getNode(ISD::FP_EXTEND, DL, ValueVT, Val);
}
- llvm_unreachable("Unknown mismatch!");
+ report_fatal_error("Unknown mismatch in getCopyFromParts!");
}
static void diagnosePossiblyInvalidConstraint(LLVMContext &Ctx, const Value *V,
OpenPOWER on IntegriCloud