[llvm] 6362dd0 - GlobalSplit: Convert tests to opaque pointers
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 12:21:02 PST 2022
Author: Matt Arsenault
Date: 2022-12-02T15:20:56-05:00
New Revision: 6362dd004a3645255890ffef8417f8691ab01e3e
URL: https://github.com/llvm/llvm-project/commit/6362dd004a3645255890ffef8417f8691ab01e3e
DIFF: https://github.com/llvm/llvm-project/commit/6362dd004a3645255890ffef8417f8691ab01e3e.diff
LOG: GlobalSplit: Convert tests to opaque pointers
Added:
Modified:
llvm/test/Transforms/GlobalSplit/non-beneficial.ll
llvm/test/Transforms/GlobalSplit/nonlocal.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/GlobalSplit/non-beneficial.ll b/llvm/test/Transforms/GlobalSplit/non-beneficial.ll
index 9d14828af221c..a7c50c985c907 100644
--- a/llvm/test/Transforms/GlobalSplit/non-beneficial.ll
+++ b/llvm/test/Transforms/GlobalSplit/non-beneficial.ll
@@ -4,21 +4,21 @@ target datalayout = "e-p:64:64"
target triple = "x86_64-unknown-linux-gnu"
; CHECK: @global =
- at global = internal constant { [2 x i8* ()*], [1 x i8* ()*] } {
- [2 x i8* ()*] [i8* ()* @f, i8* ()* @g],
- [1 x i8* ()*] [i8* ()* @h]
+ at global = internal constant { [2 x ptr], [1 x ptr] } {
+ [2 x ptr] [ptr @f, ptr @g],
+ [1 x ptr] [ptr @h]
}
-define i8* @f() {
- ret i8* bitcast (i8* ()** getelementptr ({ [2 x i8* ()*], [1 x i8* ()*] }, { [2 x i8* ()*], [1 x i8* ()*] }* @global, i32 0, inrange i32 0, i32 0) to i8*)
+define ptr @f() {
+ ret ptr getelementptr ({ [2 x ptr], [1 x ptr] }, ptr @global, i32 0, inrange i32 0, i32 0)
}
-define i8* @g() {
- ret i8* null
+define ptr @g() {
+ ret ptr null
}
-define i8* @h() {
- ret i8* null
+define ptr @h() {
+ ret ptr null
}
!0 = !{i32 16}
diff --git a/llvm/test/Transforms/GlobalSplit/nonlocal.ll b/llvm/test/Transforms/GlobalSplit/nonlocal.ll
index 98550cc792b24..38169a8bea479 100644
--- a/llvm/test/Transforms/GlobalSplit/nonlocal.ll
+++ b/llvm/test/Transforms/GlobalSplit/nonlocal.ll
@@ -4,26 +4,26 @@ target datalayout = "e-p:64:64"
target triple = "x86_64-unknown-linux-gnu"
; CHECK: @global =
- at global = constant { [2 x i8* ()*], [1 x i8* ()*] } {
- [2 x i8* ()*] [i8* ()* @f, i8* ()* @g],
- [1 x i8* ()*] [i8* ()* @h]
+ at global = constant { [2 x ptr], [1 x ptr] } {
+ [2 x ptr] [ptr @f, ptr @g],
+ [1 x ptr] [ptr @h]
}
-define i8* @f() {
- ret i8* bitcast (i8* ()** getelementptr ({ [2 x i8* ()*], [1 x i8* ()*] }, { [2 x i8* ()*], [1 x i8* ()*] }* @global, i32 0, inrange i32 0, i32 0) to i8*)
+define ptr @f() {
+ ret ptr getelementptr ({ [2 x ptr], [1 x ptr] }, ptr @global, i32 0, inrange i32 0, i32 0)
}
-define i8* @g() {
- ret i8* null
+define ptr @g() {
+ ret ptr null
}
-define i8* @h() {
- ret i8* null
+define ptr @h() {
+ ret ptr null
}
define void @foo() {
- %p = call i1 @llvm.type.test(i8* null, metadata !"")
+ %p = call i1 @llvm.type.test(ptr null, metadata !"")
ret void
}
-declare i1 @llvm.type.test(i8*, metadata) nounwind readnone
+declare i1 @llvm.type.test(ptr, metadata) nounwind readnone
More information about the llvm-commits
mailing list