[llvm] c4df57d - [CodeGen] llvm.allow.{runtime, ubsan}.check() in FastISel

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 31 23:41:28 PDT 2024


Author: Vitaly Buka
Date: 2024-03-31T23:39:33-07:00
New Revision: c4df57da1d7ede73c11a9ae60f4d4a2ce5132c56

URL: https://github.com/llvm/llvm-project/commit/c4df57da1d7ede73c11a9ae60f4d4a2ce5132c56
DIFF: https://github.com/llvm/llvm-project/commit/c4df57da1d7ede73c11a9ae60f4d4a2ce5132c56.diff

LOG: [CodeGen] llvm.allow.{runtime,ubsan}.check() in FastISel

Follow up to #86049.
clang-armv8-quick build bot can trigger this branch.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index dae827883b29b1..aefedd060f897d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1462,8 +1462,13 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
     llvm_unreachable("llvm.is.constant.* should have been lowered already");
 
   case Intrinsic::allow_runtime_check:
-  case Intrinsic::allow_ubsan_check:
-    llvm_unreachable("llvm.*.check should have been lowered already");
+  case Intrinsic::allow_ubsan_check: {
+    Register ResultReg = getRegForValue(ConstantInt::getTrue(II->getType()));
+    if (!ResultReg)
+      return false;
+    updateValueMap(II, ResultReg);
+    return true;
+  }
 
   case Intrinsic::launder_invariant_group:
   case Intrinsic::strip_invariant_group:


        


More information about the llvm-commits mailing list