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) } +;.