Skip to content

Commit

Permalink
replace llvm_unreachable with assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed Aug 29, 2024
1 parent 0efd43e commit 78fd3c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clang/lib/CodeGen/CGBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18709,9 +18709,9 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
retType = llvm::VectorType::get(
retType, ElementCount::getFixed(XVecTy->getNumElements()));
}
if (!E->getArg(0)->getType()->hasFloatingRepresentation() &&
!E->getArg(0)->getType()->hasSignedIntegerRepresentation())
llvm_unreachable("sign operand must have a float or int representation");
assert((E->getArg(0)->getType()->hasFloatingRepresentation() ||
E->getArg(0)->getType()->hasSignedIntegerRepresentation()) &&
"sign operand must have a float or int representation");

return Builder.CreateIntrinsic(
retType, CGM.getHLSLRuntime().getSignIntrinsic(),
Expand Down

0 comments on commit 78fd3c2

Please sign in to comment.