[llvm] 739ea09 - [X86] Convert test to opaque pointers (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 04:49:51 PDT 2023
Author: Nikita Popov
Date: 2023-04-04T13:49:43+02:00
New Revision: 739ea090323ad50104a2a22e6da3e326d372e2ba
URL: https://github.com/llvm/llvm-project/commit/739ea090323ad50104a2a22e6da3e326d372e2ba
DIFF: https://github.com/llvm/llvm-project/commit/739ea090323ad50104a2a22e6da3e326d372e2ba.diff
LOG: [X86] Convert test to opaque pointers (NFC)
Retaining bitcasts to keep test intent.
addrsig_sym is no longer emitted for metedata_f1, but this
improvement is ultimately inconsequential, as it will get dropped
at a later stage anyway.
Added:
Modified:
llvm/test/CodeGen/X86/addrsig.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/addrsig.ll b/llvm/test/CodeGen/X86/addrsig.ll
index d171441cffe1..e306681b00a1 100644
--- a/llvm/test/CodeGen/X86/addrsig.ll
+++ b/llvm/test/CodeGen/X86/addrsig.ll
@@ -1,6 +1,6 @@
-; RUN: llc -opaque-pointers=0 < %s -mtriple=x86_64-unknown-linux | FileCheck --check-prefix=NO-ADDRSIG %s
-; RUN: llc -opaque-pointers=0 < %s -mtriple=x86_64-unknown-linux -addrsig | FileCheck %s
-; RUN: llc -opaque-pointers=0 %s -filetype=obj -mtriple=x86_64-unknown-linux -addrsig -o %t
+; RUN: llc < %s -mtriple=x86_64-unknown-linux | FileCheck --check-prefix=NO-ADDRSIG %s
+; RUN: llc < %s -mtriple=x86_64-unknown-linux -addrsig | FileCheck %s
+; RUN: llc %s -filetype=obj -mtriple=x86_64-unknown-linux -addrsig -o %t
; RUN: llvm-readobj --addrsig %t | FileCheck %s --check-prefix=SYM
; NO-ADDRSIG-NOT: .addrsig
@@ -16,36 +16,36 @@
; CHECK: .addrsig
; CHECK: .addrsig_sym f1
-define void()* @f1() {
- %f1 = bitcast void()* ()* @f1 to i8*
- %f2 = bitcast void()* ()* @f2 to i8*
- %f3 = bitcast void()* @f3 to i8*
- %g1 = bitcast i32* @g1 to i8*
- %g2 = bitcast i32* @g2 to i8*
- %g3 = bitcast i32* @g3 to i8*
- %dllimport = bitcast i32* @dllimport to i8*
- %tls = bitcast i32* @tls to i8*
- %a1 = bitcast i32* @a1 to i8*
- %a2 = bitcast i32* @a2 to i8*
- %i1 = bitcast void()* @i1 to i8*
- %i2 = bitcast void()* @i2 to i8*
- call void @llvm.dbg.value(metadata i8* bitcast (void()* @metadata_f1 to i8*), metadata !5, metadata !DIExpression()), !dbg !7
- call void @llvm.dbg.value(metadata i8* bitcast (void()* @metadata_f2 to i8*), metadata !5, metadata !DIExpression()), !dbg !7
- call void @f4(i8* bitcast (void()* @metadata_f2 to i8*))
+define ptr @f1() {
+ %f1 = bitcast ptr @f1 to ptr
+ %f2 = bitcast ptr @f2 to ptr
+ %f3 = bitcast ptr @f3 to ptr
+ %g1 = bitcast ptr @g1 to ptr
+ %g2 = bitcast ptr @g2 to ptr
+ %g3 = bitcast ptr @g3 to ptr
+ %dllimport = bitcast ptr @dllimport to ptr
+ %tls = bitcast ptr @tls to ptr
+ %a1 = bitcast ptr @a1 to ptr
+ %a2 = bitcast ptr @a2 to ptr
+ %i1 = bitcast ptr @i1 to ptr
+ %i2 = bitcast ptr @i2 to ptr
+ call void @llvm.dbg.value(metadata ptr @metadata_f1, metadata !5, metadata !DIExpression()), !dbg !7
+ call void @llvm.dbg.value(metadata ptr @metadata_f2, metadata !5, metadata !DIExpression()), !dbg !7
+ call void @f4(ptr @metadata_f2)
unreachable
}
-declare void @f4(i8*) unnamed_addr
+declare void @f4(ptr) unnamed_addr
-;; f1 is unreferenced, so this directive does not emit an entry.
-; CHECK: .addrsig_sym metadata_f1
+;; f1 is unreferenced, so this directive would not emit an entry anyway.
+; CHECK-NOT: .addrsig_sym metadata_f1
declare void @metadata_f1()
; CHECK: .addrsig_sym metadata_f2
declare void @metadata_f2()
; CHECK-NOT: .addrsig_sym f2
-define internal void()* @f2() local_unnamed_addr {
+define internal ptr @f2() local_unnamed_addr {
unreachable
}
@@ -69,14 +69,14 @@ declare void @f3() unnamed_addr
@tls = thread_local global i32 0
; CHECK: .addrsig_sym a1
- at a1 = alias i32, i32* @g1
+ at a1 = alias i32, ptr @g1
; CHECK-NOT: .addrsig_sym a2
- at a2 = internal local_unnamed_addr alias i32, i32* @g2
+ at a2 = internal local_unnamed_addr alias i32, ptr @g2
; CHECK: .addrsig_sym i1
- at i1 = ifunc void(), void()* ()* @f1
+ at i1 = ifunc void(), ptr @f1
; CHECK-NOT: .addrsig_sym i2
- at i2 = internal local_unnamed_addr ifunc void(), void()* ()* @f2
+ at i2 = internal local_unnamed_addr ifunc void(), ptr @f2
declare void @llvm.dbg.value(metadata, metadata, metadata)
More information about the llvm-commits
mailing list