Issue 114121
Summary clang 18 fails tail call
Labels clang
Assignees
Reporter hjl-tools
    ```
[hjl@gnu-tgl-3 pr14907]$ cat s.c
extern int baz (long c1);

int
foo (short c1)
{
  return baz (c1);
}
[hjl@gnu-tgl-3 pr14907]$ clang -S -O2 s.c
[hjl@gnu-tgl-3 pr14907]$ cat s.s
	.text
	.file	"s.c"
	.globl	foo # -- Begin function foo
	.p2align	4, 0x90
	.type	foo,@function
foo:                                    # @foo
	.cfi_startproc
# %bb.0:
	movslq	%edi, %rdi
	jmp	baz # TAILCALL
.Lfunc_end0:
	.size	foo, .Lfunc_end0-foo
	.cfi_endproc
 # -- End function
	.ident	"clang version 18.1.8 (Fedora 18.1.8-1.fc40)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
[hjl@gnu-tgl-3 pr14907]$ 
``

"movslq	%edi, %rdi" should be "movswq	%di, %rdi"
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to