Skip to content

Commit 0a86635

Browse files
authored
[PILC][NFC] Run UTC on good-prototype.ll (#167741)
Prefacing PR #167742 (stacked above this), noticed that running UTC made some changes unrelated to the aforementioned PR. Factoring them out here.
1 parent 606a0c2 commit 0a86635

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
22
; RUN: opt -S -passes=partially-inline-libcalls -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
33

44
define float @f(float %val) {
55
; CHECK-LABEL: @f(
66
; CHECK-NEXT: entry:
7-
; CHECK-NEXT: [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[READNONE:.*]]
7+
; CHECK-NEXT: [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR0:[0-9]+]]
88
; CHECK-NEXT: [[TMP0:%.*]] = fcmp oge float [[VAL]], 0.000000e+00
99
; CHECK-NEXT: br i1 [[TMP0]], label [[ENTRY_SPLIT:%.*]], label [[CALL_SQRT:%.*]]
1010
; CHECK: call.sqrt:
@@ -21,14 +21,32 @@ entry:
2121

2222
define float @f_writeonly(float %val) {
2323
; CHECK-LABEL: @f_writeonly(
24-
; CHECK-NEXt: [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[READNONE]]
24+
; CHECK-NEXT: [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR0]]
25+
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oge float [[VAL]], 0.000000e+00
26+
; CHECK-NEXT: br i1 [[TMP1]], label [[DOTSPLIT:%.*]], label [[CALL_SQRT:%.*]]
27+
; CHECK: call.sqrt:
28+
; CHECK-NEXT: [[TMP2:%.*]] = tail call float @sqrtf(float [[VAL]]) #[[ATTR1:[0-9]+]]
29+
; CHECK-NEXT: br label [[DOTSPLIT]]
30+
; CHECK: .split:
31+
; CHECK-NEXT: [[TMP3:%.*]] = phi float [ [[RES]], [[TMP0:%.*]] ], [ [[TMP2]], [[CALL_SQRT]] ]
32+
; CHECK-NEXT: ret float [[TMP3]]
33+
;
2534
%res = tail call float @sqrtf(float %val) writeonly
2635
ret float %res
2736
}
2837

2938
define float @f_readonly(float %val) {
39+
; CHECK-LABEL: @f_readonly(
40+
; CHECK-NEXT: [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR2:[0-9]+]]
41+
; CHECK-NEXT: ret float [[RES]]
42+
;
3043
%res = tail call float @sqrtf(float %val) readonly
3144
ret float %res
3245
}
3346

3447
declare float @sqrtf(float)
48+
;.
49+
; CHECK: attributes #[[ATTR0]] = { memory(none) }
50+
; CHECK: attributes #[[ATTR1]] = { memory(write) }
51+
; CHECK: attributes #[[ATTR2]] = { memory(read) }
52+
;.

0 commit comments

Comments
 (0)