Skip to content

Commit c4df57d

Browse files
committed
[CodeGen] llvm.allow.{runtime,ubsan}.check() in FastISel
Follow up to #86049. clang-armv8-quick build bot can trigger this branch.
1 parent b890c17 commit c4df57d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,8 +1462,13 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
14621462
llvm_unreachable("llvm.is.constant.* should have been lowered already");
14631463

14641464
case Intrinsic::allow_runtime_check:
1465-
case Intrinsic::allow_ubsan_check:
1466-
llvm_unreachable("llvm.*.check should have been lowered already");
1465+
case Intrinsic::allow_ubsan_check: {
1466+
Register ResultReg = getRegForValue(ConstantInt::getTrue(II->getType()));
1467+
if (!ResultReg)
1468+
return false;
1469+
updateValueMap(II, ResultReg);
1470+
return true;
1471+
}
14671472

14681473
case Intrinsic::launder_invariant_group:
14691474
case Intrinsic::strip_invariant_group:

0 commit comments

Comments
 (0)