[llvm] aaeb951 - [DebugInfo] Avoid ptrtoint expression in generic test
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 02:20:48 PDT 2022
Author: Nikita Popov
Date: 2022-07-25T11:20:36+02:00
New Revision: aaeb951b2763ecd07e16875983dea19d5dee6b95
URL: https://github.com/llvm/llvm-project/commit/aaeb951b2763ecd07e16875983dea19d5dee6b95
DIFF: https://github.com/llvm/llvm-project/commit/aaeb951b2763ecd07e16875983dea19d5dee6b95.diff
LOG: [DebugInfo] Avoid ptrtoint expression in generic test
After D130366 the ptrtoint expression this used results in an
error on 32-bit targets (the IR was already invalid previously,
but only produced the error with -filetype=obj).
Tweak the IR so it is correct for both 32-bit and 64-bit targets,
and can thus continue working as a generic test.
Added:
Modified:
llvm/test/DebugInfo/Generic/inheritance.ll
Removed:
################################################################################
diff --git a/llvm/test/DebugInfo/Generic/inheritance.ll b/llvm/test/DebugInfo/Generic/inheritance.ll
index 31f6bf8b9128..54fc7b35a7f1 100644
--- a/llvm/test/DebugInfo/Generic/inheritance.ll
+++ b/llvm/test/DebugInfo/Generic/inheritance.ll
@@ -6,7 +6,7 @@
%struct.test1 = type { i32 (...)** }
@_ZTV5test1 = weak_odr constant [4 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI5test1 to i32 (...)*), i32 (...)* bitcast (void (%struct.test1*)* @_ZN5test1D1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.test1*)* @_ZN5test1D0Ev to i32 (...)*)], align 32 ; <[4 x i32 (...)*]*> [#uses=1]
- at _ZTI5test1 = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i64 add (i64 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i64), i64 16) to i8*), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @_ZTS5test1, i64 0, i64 0) } }, align 16 ; <%struct.__class_type_info_pseudo*> [#uses=1]
+ at _ZTI5test1 = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* getelementptr (i8, i8* bitcast ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i8*), i64 16), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @_ZTS5test1, i64 0, i64 0) } }, align 16 ; <%struct.__class_type_info_pseudo*> [#uses=1]
@_ZTVN10__cxxabiv117__class_type_infoE = external constant [0 x i32 (...)*] ; <[0 x i32 (...)*]*> [#uses=1]
@_ZTS5test1 = weak_odr constant [7 x i8] c"5test1\00" ; <[7 x i8]*> [#uses=2]
More information about the llvm-commits
mailing list