Skip to content

Conversation

@mtrofin
Copy link
Member

@mtrofin mtrofin commented Nov 12, 2025

Prefacing PR #167742 (stacked above this), noticed that running UTC made some changes unrelated to the aforementioned PR. Factoring them out here.

Copy link
Member Author

mtrofin commented Nov 12, 2025

@mtrofin mtrofin marked this pull request as ready for review November 12, 2025 21:05
@mtrofin mtrofin changed the title [PILC] Run UTC on good-prototype.ll [PILC][NFC] Run UTC on good-prototype.ll Nov 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 12, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Mircea Trofin (mtrofin)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/167741.diff

1 Files Affected:

  • (modified) llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll (+21-3)
diff --git a/llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll b/llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
index e6c2a7e629a5d..5719753aa2da0 100644
--- a/llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
+++ b/llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
@@ -1,10 +1,10 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -S -passes=partially-inline-libcalls -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
 
 define float @f(float %val) {
 ; CHECK-LABEL: @f(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[READNONE:.*]]
+; CHECK-NEXT:    [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR0:[0-9]+]]
 ; CHECK-NEXT:    [[TMP0:%.*]] = fcmp oge float [[VAL]], 0.000000e+00
 ; CHECK-NEXT:    br i1 [[TMP0]], label [[ENTRY_SPLIT:%.*]], label [[CALL_SQRT:%.*]]
 ; CHECK:       call.sqrt:
@@ -21,14 +21,32 @@ entry:
 
 define float @f_writeonly(float %val) {
 ; CHECK-LABEL: @f_writeonly(
-; CHECK-NEXt:    [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[READNONE]]
+; CHECK-NEXT:    [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR0]]
+; CHECK-NEXT:    [[TMP1:%.*]] = fcmp oge float [[VAL]], 0.000000e+00
+; CHECK-NEXT:    br i1 [[TMP1]], label [[DOTSPLIT:%.*]], label [[CALL_SQRT:%.*]]
+; CHECK:       call.sqrt:
+; CHECK-NEXT:    [[TMP2:%.*]] = tail call float @sqrtf(float [[VAL]]) #[[ATTR1:[0-9]+]]
+; CHECK-NEXT:    br label [[DOTSPLIT]]
+; CHECK:       .split:
+; CHECK-NEXT:    [[TMP3:%.*]] = phi float [ [[RES]], [[TMP0:%.*]] ], [ [[TMP2]], [[CALL_SQRT]] ]
+; CHECK-NEXT:    ret float [[TMP3]]
+;
   %res = tail call float @sqrtf(float %val) writeonly
   ret float %res
 }
 
 define float @f_readonly(float %val) {
+; CHECK-LABEL: @f_readonly(
+; CHECK-NEXT:    [[RES:%.*]] = tail call float @sqrtf(float [[VAL:%.*]]) #[[ATTR2:[0-9]+]]
+; CHECK-NEXT:    ret float [[RES]]
+;
   %res = tail call float @sqrtf(float %val) readonly
   ret float %res
 }
 
 declare float @sqrtf(float)
+;.
+; CHECK: attributes #[[ATTR0]] = { memory(none) }
+; CHECK: attributes #[[ATTR1]] = { memory(write) }
+; CHECK: attributes #[[ATTR2]] = { memory(read) }
+;.

Copy link
Member Author

mtrofin commented Nov 13, 2025

Merge activity

  • Nov 13, 8:20 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Nov 13, 8:22 PM UTC: @mtrofin merged this pull request with Graphite.

@mtrofin mtrofin merged commit 0a86635 into main Nov 13, 2025
14 checks passed
@mtrofin mtrofin deleted the users/mtrofin/11-12-_pilc_run_utc_on_good-prototype.ll_ branch November 13, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants