llvm-project/llvm/test/CodeGen/Mips/private-global-prefix.ll
yingopq ca6398c79e
[COFF][Mips] Set PrivateGlobalPrefix to .L (#140033)
When calling external functions which start with `L`, would generate
error: assembler label 'LeaveFoo' can not be undefined. This pr would
fix this issue.

Fix #134914.
2025-05-16 11:22:44 +08:00

25 lines
552 B
LLVM

; RUN: llc -mtriple=mipsel-w64-windows-gnu < %s | FileCheck %s -check-prefix=MIPSEL
define void @f() {
; MIPSEL-LABEL: f:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -24
; MIPSEL-NEXT: sw $ra, 20($sp)
; MIPSEL-NEXT: jal LeaveFoo
; MIPSEL-NEXT: nop
; MIPSEL-NEXT: jal LocalBar
; MIPSEL-NEXT: nop
; MIPSEL-NEXT: lw $ra, 20($sp)
; MIPSEL-NEXT: jr $ra
; MIPSEL-NEXT: addiu $sp, $sp, 24
entry:
call void @LeaveFoo()
call void @LocalBar()
ret void
}
declare void @LeaveFoo()
declare void @LocalBar()