-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created using spr 1.3.5-bogner
- Loading branch information
Showing
8 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 5 | ||
; RUN: opt < %s -S -passes='inferattrs<O0>' | FileCheck %s --check-prefix=O0 | ||
; RUN: opt < %s -S -passes='inferattrs' | FileCheck %s --check-prefix=CHECK | ||
|
||
%struct.A = type { i8 } | ||
|
||
@a = dso_local global %struct.A zeroinitializer, align 1 | ||
@__dso_handle = external hidden global i8 | ||
@llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_, ptr null }] | ||
|
||
declare void @external() | ||
declare void @external_optnone() noinline optnone | ||
declare void @_ZN1AD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr | ||
declare i32 @__cxa_atexit(ptr, ptr, ptr) | ||
|
||
;. | ||
; O0: @a = dso_local global %struct.A zeroinitializer, align 1 | ||
; O0: @__dso_handle = external hidden global i8 | ||
; O0: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_, ptr null }] | ||
;. | ||
; CHECK: @a = dso_local global %struct.A zeroinitializer, align 1 | ||
; CHECK: @__dso_handle = external hidden global i8 | ||
; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_, ptr null }] | ||
;. | ||
define internal void @_GLOBAL__sub_I_() section ".text.startup" { | ||
; O0-LABEL: define internal void @_GLOBAL__sub_I_() section ".text.startup" { | ||
; O0-NEXT: call void @external() | ||
; O0-NEXT: call void @external_optnone() | ||
; O0-NEXT: [[TMP0:%.*]] = tail call i32 @__cxa_atexit(ptr nonnull @_ZN1AD1Ev, ptr nonnull @a, ptr nonnull @__dso_handle) | ||
; O0-NEXT: ret void | ||
; | ||
; CHECK-LABEL: define internal void @_GLOBAL__sub_I_() section ".text.startup" { | ||
; CHECK-NEXT: call void @external() | ||
; CHECK-NEXT: call void @external_optnone() | ||
; CHECK-NEXT: [[TMP0:%.*]] = tail call i32 @__cxa_atexit(ptr nonnull @_ZN1AD1Ev, ptr nonnull @a, ptr nonnull @__dso_handle) | ||
; CHECK-NEXT: ret void | ||
; | ||
call void @external() | ||
call void @external_optnone() | ||
%x = tail call i32 @__cxa_atexit(ptr nonnull @_ZN1AD1Ev, ptr nonnull @a, ptr nonnull @__dso_handle) | ||
ret void | ||
} | ||
|
||
!llvm.module.flags = !{!0} | ||
!0 = !{i32 7, !"RtLibUseGOT", i32 1} | ||
;. | ||
; O0: attributes #[[ATTR0:[0-9]+]] = { nonlazybind } | ||
; O0: attributes #[[ATTR1:[0-9]+]] = { noinline nonlazybind optnone } | ||
;. | ||
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nonlazybind } | ||
; CHECK: attributes #[[ATTR1:[0-9]+]] = { noinline nonlazybind optnone } | ||
; CHECK: attributes #[[ATTR2:[0-9]+]] = { nofree nonlazybind } | ||
;. | ||
; O0: [[META0:![0-9]+]] = !{i32 7, !"RtLibUseGOT", i32 1} | ||
;. | ||
; CHECK: [[META0:![0-9]+]] = !{i32 7, !"RtLibUseGOT", i32 1} | ||
;. |