[llvm] [SjLjEHPrepare] Fix callsite problem (PR #67264)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 29 03:55:04 PST 2024


================
@@ -0,0 +1,102 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
+; RUN: llc < %s -mtriple=ve --exception-model=sjlj | FileCheck %s
+
+;;; Test for SjLjEHPrepare.cpp.
+;;; This checks whether only correct resumeLocation (1) is inserted just
+;;; before invoking __cxa_bad_cast.
+
+ at _ZTISt8bad_cast = external dso_local constant ptr
+ at _ZTVN10__cxxabiv117__class_type_infoE = external dso_local global [0 x ptr]
+ at _ZTSZ15bad_typeid_testvE1A = internal constant [23 x i8] c"Z15bad_typeid_testvE1A\00", align 1
+ at _ZTSZ13bad_cast_testvE1A = internal constant [21 x i8] c"Z13bad_cast_testvE1A\00", align 1
+ at _ZTIZ13bad_cast_testvE1A = internal constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTSZ13bad_cast_testvE1A }, align 8
+ at _ZTSZ13bad_cast_testvE1B = internal constant [21 x i8] c"Z13bad_cast_testvE1B\00", align 1
+ at _ZTIZ13bad_cast_testvE1B = internal constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTSZ13bad_cast_testvE1B }, align 8
+ at _ZTVN10__cxxabiv121__vmi_class_type_infoE = external dso_local global [0 x ptr]
+ at _ZTSZ13bad_cast_testvE1D = internal constant [21 x i8] c"Z13bad_cast_testvE1D\00", align 1
+ at _ZTIZ13bad_cast_testvE1D = internal constant { ptr, ptr, i32, i32, ptr, i64, ptr, i64 } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2), ptr @_ZTSZ13bad_cast_testvE1D, i32 0, i32 2, ptr @_ZTIZ13bad_cast_testvE1A, i64 -6141, ptr @_ZTIZ13bad_cast_testvE1B, i64 0 }, align 8
+
+; Function Attrs: mustprogress noinline optnone
+define dso_local noundef zeroext i1 @_Z13bad_cast_testv() #0 personality ptr @__gxx_personality_sj0 {
----------------
arsenm wrote:

Can this be reduced? There are a lot of globals here. You also can probably drop most of the attributes 

https://github.com/llvm/llvm-project/pull/67264


More information about the llvm-commits mailing list