Skip to content

[test][AArch64][CodeGen] Delete redundant check lines #87965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

kovdan01
Copy link
Contributor

@kovdan01 kovdan01 commented Apr 8, 2024

llvm/test/CodeGen/AArch64/elf-globals-pic.ll:

Since https://reviews.llvm.org/D91734, elf-globals-static.ll test contains several CHECK-PIC lines. They do not seem to bring any value since there are no FileCheck run lines checking against this prefix. The right place for such tests should be elf-globals-pic.ll, which already contains check lines being deleted in this commit. Both elf-globals-pic.ll and elf-globals-static.ll were created after splitting arm64-elf-globals.ll in 6dbd0ea, and having CHECK-PIC lines in elf-globals-static.ll seems like an issue occurred because of git thinking that elf-globals-pic.ll is a new file and elf-global-static.ll is a rename of arm64-elf-globals.ll.

llvm/test/CodeGen/AArch64/tagged-globals-pic.ll:

Similar to elf-globals-pic.ll, contains unneeded CHECK-SELECTIONDAGISEL and CHECK-GLOBALISEL directives not checked by any FileCheck invocation. These directives are present in tagged-globals-static.ll. Both tests are present in the code tree since fd32639 when tagged-globals.ll was splitted into tagged-globals-{pic|static}.ll.

@kovdan01 kovdan01 requested review from asl, MaskRay and pogo59 April 8, 2024 07:33
@kovdan01 kovdan01 marked this pull request as ready for review April 8, 2024 07:33
@llvmbot
Copy link
Member

llvmbot commented Apr 8, 2024

@llvm/pr-subscribers-backend-aarch64

Author: Daniil Kovalev (kovdan01)

Changes

Since https://reviews.llvm.org/D91734, CodeGen/AArch64/elf-globals-static.ll test contains several CHECK-PIC lines. They do not seem to bring any value since there are no FileCheck run lines checking against this prefix. The right place for such tests should be elf-globals-pic.ll, which already contains check lines being deleted in this commit. Both elf-globals-pic.ll and elf-globals-static.ll were created after splitting arm64-elf-globals.ll in 6dbd0ea, and having CHECK-PIC lines in elf-globals-static.ll seems like an issue occurred because of git thinking that elf-globals-pic.ll is a new file and elf-global-static.ll is a rename of arm64-elf-globals.ll


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

1 Files Affected:

  • (modified) llvm/test/CodeGen/AArch64/elf-globals-static.ll (-5)
diff --git a/llvm/test/CodeGen/AArch64/elf-globals-static.ll b/llvm/test/CodeGen/AArch64/elf-globals-static.ll
index 86b7c401b9a2e0..855312f8927c7d 100644
--- a/llvm/test/CodeGen/AArch64/elf-globals-static.ll
+++ b/llvm/test/CodeGen/AArch64/elf-globals-static.ll
@@ -15,11 +15,6 @@ define i8 @test_i8(i8 %new) {
 ; CHECK: ldrb {{w[0-9]+}}, [x[[HIREG]], :lo12:var8]
 ; CHECK: strb {{w[0-9]+}}, [x[[HIREG]], :lo12:var8]
 
-; CHECK-PIC-LABEL: test_i8:
-; CHECK-PIC: adrp x[[HIREG:[0-9]+]], :got:var8
-; CHECK-PIC: ldr x[[VAR_ADDR:[0-9]+]], [x[[HIREG]], :got_lo12:var8]
-; CHECK-PIC: ldrb {{w[0-9]+}}, [x[[VAR_ADDR]]]
-
 ; CHECK-FAST-LABEL: test_i8:
 ; CHECK-FAST: adrp x[[HIREG:[0-9]+]], var8
 ; CHECK-FAST: ldrb {{w[0-9]+}}, [x[[HIREG]], :lo12:var8]

llvm/test/CodeGen/AArch64/elf-globals-pic.ll:

Since https://reviews.llvm.org/D91734, elf-globals-static.ll test contains
several `CHECK-PIC` lines. They do not seem to bring any value since there
are no FileCheck run lines checking against this prefix. The right place for
such tests should be elf-globals-pic.ll, which already contains check lines
being deleted in this commit. Both elf-globals-pic.ll and
elf-globals-static.ll were created after splitting arm64-elf-globals.ll in
6dbd0ea, and having `CHECK-PIC` lines in
elf-globals-static.ll seems like an issue occurred because of git thinking
that elf-globals-pic.ll is a new file and elf-global-static.ll is a rename
of arm64-elf-globals.ll.

llvm/test/CodeGen/AArch64/tagged-globals-pic.ll:

Similar to elf-globals-pic.ll, contains unneeded `CHECK-SELECTIONDAGISEL`
and `CHECK-GLOBALISEL` directives not checked by any FileCheck invocation.
These directives are present in tagged-globals-static.ll. Both tests are
present in the code tree since fd32639
when tagged-globals.ll was splitted into tagged-globals-{pic|static}.ll.
@kovdan01 kovdan01 force-pushed the delete-redundant-check-lines branch from 72c2cb1 to 030c44d Compare April 8, 2024 10:20
@kovdan01 kovdan01 changed the title [test][AArch64][CodeGen] Delete redundant CHECK-PIC lines [test][AArch64][CodeGen] Delete redundant check lines Apr 8, 2024
Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both changes look sensible to me. Thanks

@kovdan01 kovdan01 merged commit 89eb1a5 into llvm:main Apr 8, 2024
kovdan01 added a commit to kovdan01/llvm-project that referenced this pull request Apr 18, 2024
…ic.ll

Similarly to llvm#87965, delete check lines which do not have corresponding
FileCheck run lines in tiny-model-pic.ll (while having them tested in
tiny-model-static.ll).
kovdan01 added a commit that referenced this pull request Apr 19, 2024
…ic.ll (#89243)

Similarly to #87965, delete check lines which do not have corresponding
FileCheck run lines in tiny-model-pic.ll (while having them tested in
tiny-model-static.ll).
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