From 6362dd004a3645255890ffef8417f8691ab01e3e Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 26 Nov 2022 19:21:01 -0500 Subject: [PATCH] GlobalSplit: Convert tests to opaque pointers --- llvm/test/Transforms/GlobalSplit/non-beneficial.ll | 18 +++++++++--------- llvm/test/Transforms/GlobalSplit/nonlocal.ll | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/llvm/test/Transforms/GlobalSplit/non-beneficial.ll b/llvm/test/Transforms/GlobalSplit/non-beneficial.ll index 9d14828..a7c50c9 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 = -@global = internal constant { [2 x i8* ()*], [1 x i8* ()*] } { - [2 x i8* ()*] [i8* ()* @f, i8* ()* @g], - [1 x i8* ()*] [i8* ()* @h] +@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 98550cc..38169a8 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 = -@global = constant { [2 x i8* ()*], [1 x i8* ()*] } { - [2 x i8* ()*] [i8* ()* @f, i8* ()* @g], - [1 x i8* ()*] [i8* ()* @h] +@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 -- 2.7.4