Skip to content

Commit 8b35e92

Browse files
paperchalicedvbuka
authored andcommitted
[test][Transforms] Remove unsafe-fp-math uses part 1 (NFC) (llvm#164742)
Post cleanup for llvm#164534.
1 parent 6490317 commit 8b35e92

File tree

20 files changed

+90
-156
lines changed

20 files changed

+90
-156
lines changed

llvm/test/Transforms/ADCE/2016-09-06.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
55
target triple = "x86_64-unknown-linux-gnu"
66

77
; Function Attrs: nounwind uwtable
8-
define i32 @foo(i32, i32, i32) #0 {
8+
define i32 @foo(i32, i32, i32) {
99
%4 = alloca i32, align 4
1010
%5 = alloca i32, align 4
1111
%6 = alloca i32, align 4
@@ -48,8 +48,6 @@ B21:
4848
ret i32 %I22
4949
}
5050

51-
attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
52-
5351
!llvm.ident = !{!0}
5452

5553
!0 = !{!"clang version 4.0.0"}

llvm/test/Transforms/ADCE/blocks-with-dead-term-nondeterministic.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ target triple = "x86_64-apple-macosx10.10.0"
55

66
; CHECK: uselistorder label %bb16, { 1, 0 }
77
; Function Attrs: noinline nounwind ssp uwtable
8-
define void @ham(i1 %arg) local_unnamed_addr #0 {
8+
define void @ham(i1 %arg) local_unnamed_addr {
99
bb:
1010
br i1 false, label %bb1, label %bb22
1111

@@ -64,8 +64,6 @@ bb22: ; preds = %bb21, %bb
6464
ret void
6565
}
6666

67-
attributes #0 = { noinline nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="core2" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
68-
6967
!llvm.module.flags = !{!0}
7068

7169
!0 = !{i32 7, !"PIC Level", i32 2}

llvm/test/Transforms/AddDiscriminators/basic.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
; if (i < 10) x = i;
1212
; }
1313

14-
define void @foo(i32 %i) #0 !dbg !4 {
14+
define void @foo(i32 %i) !dbg !4 {
1515
entry:
1616
%i.addr = alloca i32, align 4
1717
%x = alloca i32, align 4
@@ -35,8 +35,6 @@ if.end: ; preds = %if.then, %entry
3535
; CHECK: ret void, !dbg ![[END:[0-9]+]]
3636
}
3737

38-
attributes #0 = { nounwind uwtable noinline optnone "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
39-
4038
!llvm.dbg.cu = !{!0}
4139
!llvm.module.flags = !{!7, !8}
4240
!llvm.ident = !{!9}

llvm/test/Transforms/AddDiscriminators/call-nested.ll

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
; #6 }
1010

1111
; Function Attrs: uwtable
12-
define i32 @_Z3bazv() #0 !dbg !4 {
12+
define i32 @_Z3bazv() !dbg !4 {
1313
%1 = call i32 @_Z3barv(), !dbg !11
1414
; CHECK: %1 = call i32 @_Z3barv(), !dbg ![[CALL0:[0-9]+]]
1515
%2 = call i32 @_Z3barv(), !dbg !12
@@ -19,12 +19,9 @@ define i32 @_Z3bazv() #0 !dbg !4 {
1919
ret i32 %3, !dbg !14
2020
}
2121

22-
declare i32 @_Z3fooii(i32, i32) #1
22+
declare i32 @_Z3fooii(i32, i32)
2323

24-
declare i32 @_Z3barv() #1
25-
26-
attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
27-
attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
24+
declare i32 @_Z3barv()
2825

2926
!llvm.dbg.cu = !{!0}
3027
!llvm.module.flags = !{!8, !9}

llvm/test/Transforms/AddDiscriminators/call.ll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
; #5 }
99

1010
; Function Attrs: uwtable
11-
define void @_Z3foov() #0 !dbg !4 {
11+
define void @_Z3foov() !dbg !4 {
1212
call void @_Z3barv(), !dbg !10
1313
; CHECK: call void @_Z3barv(), !dbg ![[CALL0:[0-9]+]]
1414
%a = alloca [100 x i8], align 16
@@ -21,13 +21,10 @@ define void @_Z3foov() #0 !dbg !4 {
2121
ret void, !dbg !13
2222
}
2323

24-
declare void @_Z3barv() #1
24+
declare void @_Z3barv()
2525
declare void @llvm.lifetime.start.p0(ptr nocapture) nounwind argmemonly
2626
declare void @llvm.lifetime.end.p0(ptr nocapture) nounwind argmemonly
2727

28-
attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
29-
attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
30-
3128
!llvm.dbg.cu = !{!0}
3229
!llvm.module.flags = !{!7, !8}
3330
!llvm.ident = !{!9}

llvm/test/Transforms/AddDiscriminators/diamond.ll

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
; bar(3): discriminator 2
1313

1414
; Function Attrs: uwtable
15-
define void @_Z3fooi(i32 %i) #0 !dbg !4 {
15+
define void @_Z3fooi(i32 %i) !dbg !4 {
1616
%1 = alloca i32, align 4
1717
store i32 %i, ptr %1, align 4
1818
call void @llvm.dbg.declare(metadata ptr %1, metadata !11, metadata !12), !dbg !13
@@ -34,13 +34,9 @@ define void @_Z3fooi(i32 %i) #0 !dbg !4 {
3434
}
3535

3636
; Function Attrs: nounwind readnone
37-
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
37+
declare void @llvm.dbg.declare(metadata, metadata, metadata)
3838

39-
declare void @_Z3bari(i32) #2
40-
41-
attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
42-
attributes #1 = { nounwind readnone }
43-
attributes #2 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
39+
declare void @_Z3bari(i32)
4440

4541
!llvm.dbg.cu = !{!0}
4642
!llvm.module.flags = !{!8, !9}

llvm/test/Transforms/AddDiscriminators/first-only.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
; }
1414
; }
1515

16-
define void @foo(i32 %i) #0 !dbg !4 {
16+
define void @foo(i32 %i) !dbg !4 {
1717
entry:
1818
%i.addr = alloca i32, align 4
1919
%x = alloca i32, align 4
@@ -44,8 +44,6 @@ if.end: ; preds = %if.then, %entry
4444
; CHECK: ret void, !dbg ![[END:[0-9]+]]
4545
}
4646

47-
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
48-
4947
!llvm.dbg.cu = !{!0}
5048
!llvm.module.flags = !{!7, !8}
5149
!llvm.ident = !{!9}

llvm/test/Transforms/AddDiscriminators/invoke.ll

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
55
target triple = "x86_64-apple-macosx10.14.0"
66

77
; Function Attrs: ssp uwtable
8-
define void @_Z3foov() #0 personality ptr @__gxx_personality_v0 !dbg !8 {
8+
define void @_Z3foov() personality ptr @__gxx_personality_v0 !dbg !8 {
99
entry:
1010
%exn.slot = alloca ptr
1111
%ehselector.slot = alloca i32
1212
; CHECK: call void @_Z12bar_noexceptv({{.*}} !dbg ![[CALL1:[0-9]+]]
13-
call void @_Z12bar_noexceptv() #4, !dbg !11
13+
call void @_Z12bar_noexceptv(), !dbg !11
1414
; CHECK: call void @_Z12bar_noexceptv({{.*}} !dbg ![[CALL2:[0-9]+]]
15-
call void @_Z12bar_noexceptv() #4, !dbg !13
15+
call void @_Z12bar_noexceptv(), !dbg !13
1616
invoke void @_Z3barv()
1717
; CHECK: unwind label {{.*}} !dbg ![[INVOKE:[0-9]+]]
1818
to label %invoke.cont unwind label %lpad, !dbg !14
@@ -31,8 +31,8 @@ lpad: ; preds = %entry
3131

3232
catch: ; preds = %lpad
3333
%exn = load ptr, ptr %exn.slot, align 8, !dbg !15
34-
%3 = call ptr @__cxa_begin_catch(ptr %exn) #4, !dbg !15
35-
invoke void @__cxa_rethrow() #5
34+
%3 = call ptr @__cxa_begin_catch(ptr %exn), !dbg !15
35+
invoke void @__cxa_rethrow()
3636
to label %unreachable unwind label %lpad1, !dbg !17
3737

3838
lpad1: ; preds = %catch
@@ -62,17 +62,17 @@ terminate.lpad: ; preds = %lpad1
6262
%7 = landingpad { ptr, i32 }
6363
catch ptr null, !dbg !20
6464
%8 = extractvalue { ptr, i32 } %7, 0, !dbg !20
65-
call void @__clang_call_terminate(ptr %8) #6, !dbg !20
65+
call void @__clang_call_terminate(ptr %8), !dbg !20
6666
unreachable, !dbg !20
6767

6868
unreachable: ; preds = %catch
6969
unreachable
7070
}
7171

7272
; Function Attrs: nounwind
73-
declare void @_Z12bar_noexceptv() #1
73+
declare void @_Z12bar_noexceptv()
7474

75-
declare void @_Z3barv() #2
75+
declare void @_Z3barv()
7676

7777
declare i32 @__gxx_personality_v0(...)
7878

@@ -83,22 +83,14 @@ declare void @__cxa_rethrow()
8383
declare void @__cxa_end_catch()
8484

8585
; Function Attrs: noinline noreturn nounwind
86-
define linkonce_odr hidden void @__clang_call_terminate(ptr) #3 {
87-
%2 = call ptr @__cxa_begin_catch(ptr %0) #4
88-
call void @_ZSt9terminatev() #6
86+
define linkonce_odr hidden void @__clang_call_terminate(ptr) {
87+
%2 = call ptr @__cxa_begin_catch(ptr %0)
88+
call void @_ZSt9terminatev()
8989
unreachable
9090
}
9191

9292
declare void @_ZSt9terminatev()
9393

94-
attributes #0 = { ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
95-
attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
96-
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
97-
attributes #3 = { noinline noreturn nounwind }
98-
attributes #4 = { nounwind }
99-
attributes #5 = { noreturn }
100-
attributes #6 = { noreturn nounwind }
101-
10294
!llvm.dbg.cu = !{!0}
10395
!llvm.module.flags = !{!3, !4, !5, !6}
10496
!llvm.ident = !{!7}

llvm/test/Transforms/AddDiscriminators/multiple.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
; The two stores inside the if-then-else line must have different discriminator
1111
; values.
1212

13-
define void @foo(i32 %i) #0 !dbg !4 {
13+
define void @foo(i32 %i) !dbg !4 {
1414
entry:
1515
%i.addr = alloca i32, align 4
1616
%x = alloca i32, align 4
@@ -45,8 +45,6 @@ if.end: ; preds = %if.else, %if.then
4545
ret void, !dbg !12
4646
}
4747

48-
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
49-
5048
!llvm.dbg.cu = !{!0}
5149
!llvm.module.flags = !{!7, !8}
5250
!llvm.ident = !{!9}

llvm/test/Transforms/AddDiscriminators/no-discriminators.ll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
; altered. If they are, it means that the discriminators pass added a
1313
; new lexical scope.
1414

15-
define i32 @foo(i64 %i) #0 !dbg !4 {
15+
define i32 @foo(i64 %i) !dbg !4 {
1616
entry:
1717
%retval = alloca i32, align 4
1818
%i.addr = alloca i64, align 8
@@ -39,10 +39,7 @@ return: ; preds = %if.else, %if.then
3939
}
4040

4141
; Function Attrs: nounwind readnone
42-
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
43-
44-
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
45-
attributes #1 = { nounwind readnone }
42+
declare void @llvm.dbg.declare(metadata, metadata, metadata)
4643

4744
; We should be able to add discriminators even in the absence of llvm.dbg.cu.
4845
; When using sample profiles, the front end will generate line tables but it

0 commit comments

Comments
 (0)