[PATCH] D148216: Add support for annotations in UpdateTestChecks (NFC)
Henrik G Olsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 05:02:26 PDT 2023
hnrklssn added a comment.
In D148216#4434171 <https://reviews.llvm.org/D148216#4434171>, @nikic wrote:
> There are some test failures.
>
> I believe there is one bug with the handling of unnamed globals. Previously we produced this:
>
> ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --version 2
> ; RUN: opt -S < %s | FileCheck %s
> @0 = global i32 0
>
> ;.
> ; CHECK: @[[GLOB0:[0-9]+]] = global i32 0
> ;.
> define i32 @test() {
> ; CHECK-LABEL: define i32 @test() {
> ; CHECK-NEXT: [[V:%.*]] = load i32, ptr @[[GLOB0]], align 4
> ; CHECK-NEXT: ret i32 [[V]]
> ;
> %v = load i32, ptr @0
> ret i32 %v
> }
>
> And now we instead check `CHECK: @0 = global i32 0`, so there is a mismatch between definition and use. I believe it does make sense to keep the wildcard names for unnamed globals.
>
> On the same test case, if I keep rerunning update_test_checks on the same file, it keeps adding extra `CHECK: @0 = global i32 0` lines at the start (before the first `;.`. That didn't happen previously.
Fixed. Does this test case exist somewhere? I couldn't find it upstream.
================
Comment at: llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/check_attrs.ll.funcattrs.expected:9
define ptr @foo(ptr %s) nounwind uwtable readnone optsize ssp {
-; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind optsize ssp willreturn memory(none) uwtable
+; CHECK: Function Attrs: nofree norecurse nosync nounwind optsize ssp willreturn memory(none) uwtable
; CHECK-LABEL: define {{[^@]+}}@foo
----------------
nikic wrote:
> Huh, where does this change come from?
I thought it was an existing test failure upstream, but it seems to have disappeared after doing a full rebuild clang+llvm.
================
Comment at: llvm/utils/UpdateTestChecks/common.py:991
+ NamelessValue(r"META" , "!" , r"![a-z.]+ " , r"![0-9]+" , None ) ,
+]
+
----------------
nikic wrote:
> Does this still comply with the formatter?
No, I guess maintaining this structure isn't worth it long term with the autoformatter
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148216/new/
https://reviews.llvm.org/D148216
More information about the llvm-commits
mailing list