[llvm] 5712e29 - [CodeGen] Clean up tests that depend on implicit .text in MCAsmStreamer

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 21:11:39 PST 2024


Author: Fangrui Song
Date: 2024-12-22T21:11:32-08:00
New Revision: 5712e293fb317b50166766ba86b969eb13fcd069

URL: https://github.com/llvm/llvm-project/commit/5712e293fb317b50166766ba86b969eb13fcd069
DIFF: https://github.com/llvm/llvm-project/commit/5712e293fb317b50166766ba86b969eb13fcd069.diff

LOG: [CodeGen] Clean up tests that depend on implicit .text in MCAsmStreamer

Added: 
    

Modified: 
    llvm/test/CodeGen/AArch64/commandline-metadata.ll
    llvm/test/CodeGen/AVR/sections.ll
    llvm/test/CodeGen/Hexagon/switch-lut-explicit-section.ll
    llvm/test/CodeGen/Hexagon/switch-lut-function-section.ll
    llvm/test/CodeGen/X86/GC/ocaml-gc.ll
    llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll
    llvm/test/CodeGen/X86/elf-unique-sections-by-flags.ll
    llvm/test/CodeGen/Xtensa/simple.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AArch64/commandline-metadata.ll b/llvm/test/CodeGen/AArch64/commandline-metadata.ll
index 7c6e01763220d1..a3d3549fca5cfc 100644
--- a/llvm/test/CodeGen/AArch64/commandline-metadata.ll
+++ b/llvm/test/CodeGen/AArch64/commandline-metadata.ll
@@ -3,7 +3,6 @@
 
 ; Verify that llvm.commandline metadata is emitted to the corresponding command line section.
 
-; CHECK:              .text
 ; CHECK:              .section .GCC.command.line,"MS", at progbits,1
 ; CHECK-NEXT:         .zero 1
 ; CHECK-NEXT:         .ascii "clang -command1"
@@ -11,8 +10,7 @@
 ; CHECK-NEXT:         .ascii "clang -command2"
 ; CHECK-NEXT:         .zero 1
 
-; CHECK-MACHO:        .section	__TEXT,__text,regular,pure_instructions
-; CHECK-MACHO-NEXT:   .section	__TEXT,__command_line
+; CHECK-MACHO:        .section	__TEXT,__command_line
 ; CHECK-MACHO-NEXT:   .space	1
 ; CHECK-MACHO-NEXT:   .ascii	"clang -command1"
 ; CHECK-MACHO-NEXT:   .space	1

diff  --git a/llvm/test/CodeGen/AVR/sections.ll b/llvm/test/CodeGen/AVR/sections.ll
index 4fd9eb142bef64..4ac1b7396d58c7 100644
--- a/llvm/test/CodeGen/AVR/sections.ll
+++ b/llvm/test/CodeGen/AVR/sections.ll
@@ -9,7 +9,6 @@
 
 ; Test that functions (in address space 1) are not considered .progmem data.
 
-; CHECK: .text
 ; SECTIONS: .text.somefunc,"ax", at progbits
 ; CHECK-LABEL: somefunc:
 define void @somefunc() addrspace(1) {

diff  --git a/llvm/test/CodeGen/Hexagon/switch-lut-explicit-section.ll b/llvm/test/CodeGen/Hexagon/switch-lut-explicit-section.ll
index 66a2c1eb9d45d6..0a8e28af5de600 100644
--- a/llvm/test/CodeGen/Hexagon/switch-lut-explicit-section.ll
+++ b/llvm/test/CodeGen/Hexagon/switch-lut-explicit-section.ll
@@ -5,7 +5,6 @@
 target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
 target triple = "hexagon-unknown--elf"
 
-;FUNCTEXT: .text
 ;FUNCTEXT: .section{{.*}}tcm.hexagon,
 ;FUNCTEXT-NOT: .section{{.*}}.rodata
 ;FUNCTEXT-NOT: .text

diff  --git a/llvm/test/CodeGen/Hexagon/switch-lut-function-section.ll b/llvm/test/CodeGen/Hexagon/switch-lut-function-section.ll
index 0b2afa75cedf37..42e2c3044595d4 100644
--- a/llvm/test/CodeGen/Hexagon/switch-lut-function-section.ll
+++ b/llvm/test/CodeGen/Hexagon/switch-lut-function-section.ll
@@ -4,7 +4,6 @@
 target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
 target triple = "hexagon-unknown--elf"
 
-;FUNCTEXT: .text
 ;FUNCTEXT: .section{{.*}}text.foo,
 ;FUNCTEXT-NOT: .section{{.*}}.rodata
 ;FUNCTEXT: .Lswitch.table:

diff  --git a/llvm/test/CodeGen/X86/GC/ocaml-gc.ll b/llvm/test/CodeGen/X86/GC/ocaml-gc.ll
index 4e4e2e952f73da..9e05f1ceaa0c31 100644
--- a/llvm/test/CodeGen/X86/GC/ocaml-gc.ll
+++ b/llvm/test/CodeGen/X86/GC/ocaml-gc.ll
@@ -1,7 +1,6 @@
 ; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck %s
 
-; CHECK:        .text
-; CHECK-NEXT:   .file   "<stdin>"
+; CHECK:        .file   "<stdin>"
 
 define i32 @main(i32 %x) nounwind gc "ocaml" {
 ; CHECK:   .globl "caml<stdin>__code_begin"

diff  --git a/llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll b/llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll
index 2e562c350be6f4..efdbfef5b87f3a 100644
--- a/llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll
+++ b/llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll
@@ -6,7 +6,6 @@ entry:
   %1 = select i1 %0, ptr blockaddress(@foo, %bb1), ptr blockaddress(@foo, %bb2) ; <ptr> [#uses=1]
   indirectbr ptr %1, [label %bb1, label %bb2]
 
-; CHECK:         .text
 ; CHECK:         .section .text.foo,"ax", at progbits
 ; CHECK-LABEL: foo:
 ; CHECK:         movl    $.Ltmp0, %eax

diff  --git a/llvm/test/CodeGen/X86/elf-unique-sections-by-flags.ll b/llvm/test/CodeGen/X86/elf-unique-sections-by-flags.ll
index 0ca08d4b3feade..01a113fdd9b2f5 100644
--- a/llvm/test/CodeGen/X86/elf-unique-sections-by-flags.ll
+++ b/llvm/test/CodeGen/X86/elf-unique-sections-by-flags.ll
@@ -11,10 +11,8 @@ define i32 @fn_text() {
     entry:
     ret i32 0
 }
-; CHECK:        .text{{$}}
-; CHECK-NEXT:   .file
 ; FNSECTIONS:   .section	.text.fn_text,"ax", at progbits{{$}}
-; CHECK-NEXT:   .globl fn_text
+; CHECK:        .globl fn_text
 ; CHECK:        fn_text:
 
 ; A second function placed in .text, to check the behaviour with -function-sections.

diff  --git a/llvm/test/CodeGen/Xtensa/simple.ll b/llvm/test/CodeGen/Xtensa/simple.ll
index a2c55aa5138352..a7cfcedfe33edc 100644
--- a/llvm/test/CodeGen/Xtensa/simple.ll
+++ b/llvm/test/CodeGen/Xtensa/simple.ll
@@ -3,3 +3,6 @@
 
 ; CHECK:  .text
 ; DUMP:   file format elf32-xtensa
+define void @f() {
+  ret void
+}


        


More information about the llvm-commits mailing list