1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
2 ; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-apple-macosx10.14.0"
6 @G = external dso_local global i32, align 4
9 ; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = external dso_local global i32, align 4
11 define void @foo(i32) {
13 ; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
14 ; CHECK-NEXT: tail call void @_Z10sideeffectv()
15 ; CHECK-NEXT: br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
17 ; CHECK-NEXT: call void @foo.cold.1() #[[ATTR2:[0-9]+]]
18 ; CHECK-NEXT: ret void
20 ; CHECK-NEXT: ret void
22 %2 = icmp eq i32 %0, 0
23 tail call void @_Z10sideeffectv()
24 br i1 %2, label %sink, label %exit
27 tail call void @_Z10sideeffectv()
28 call void @llvm.trap()
35 define void @bar(i32) {
37 ; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP0:%.*]], 0
38 ; CHECK-NEXT: tail call void @_Z10sideeffectv()
39 ; CHECK-NEXT: br i1 [[TMP2]], label [[CODEREPL:%.*]], label [[EXIT:%.*]]
41 ; CHECK-NEXT: call void @bar.cold.1() #[[ATTR2]]
42 ; CHECK-NEXT: ret void
44 ; CHECK-NEXT: ret void
46 %2 = icmp eq i32 %0, 0
47 tail call void @_Z10sideeffectv()
48 br i1 %2, label %sink, label %exit
51 tail call void @_Z10sideeffectv()
52 call void @llvm.trap()
59 declare void @llvm.trap() noreturn cold
60 declare void @_Z10sideeffectv()
62 ; CHECK: attributes #[[ATTR0:[0-9]+]] = { cold noreturn nounwind }
63 ; CHECK: attributes #[[ATTR1:[0-9]+]] = { cold minsize noreturn }
64 ; CHECK: attributes #[[ATTR2]] = { noinline }