1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

[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
This commit is contained in:
Craig Topper 2019-05-06 04:01:49 +00:00
parent a19a164c99
commit 64a7bf4f09

View File

@ -322,7 +322,7 @@ static SDValue getCopyFromParts(SelectionDAG &DAG, const SDLoc &DL,
return DAG.getNode(ISD::FP_EXTEND, DL, ValueVT, Val); 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, static void diagnosePossiblyInvalidConstraint(LLVMContext &Ctx, const Value *V,