Skip to content

Commit 4bf4a25

Browse files
committed
Add test
1 parent ad84c94 commit 4bf4a25

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
;; Test that the UEFI and Windows targets set the rex64 correctly.
2+
; RUN: llc -mtriple x86_64-uefi %s -o - | FileCheck %s -check-prefix=REX
3+
; RUN: llc -mtriple x86_64-windows-msvc %s -o - | FileCheck %s -check-prefix=REX
4+
; RUN: llc -mtriple x86_64-unknown-linux %s -o - | FileCheck %s -check-prefix=NOREX
5+
6+
define void @test_tailjmp(ptr %fptr) {
7+
; REX-LABEL: test_tailjmp: # @test_tailjmp
8+
; REX: # %bb.0: # %entry
9+
; REX-NEXT: rex64 jmpq *%rcx # TAILCALL
10+
;
11+
; NOREX-LABEL: test_tailjmp: # @test_tailjmp
12+
; NOREX: .cfi_startproc
13+
; NOREX-NEXT: # %bb.0: # %entry
14+
; NOREX-NEXT: jmpq *%rdi # TAILCALL
15+
entry:
16+
tail call void %fptr()
17+
ret void
18+
}

0 commit comments

Comments
 (0)