brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 79f6cae Raw
28 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -verify-machineinstrs < %s | FileCheck %s3; Test to check that Statepoints with X64 far-immediate targets4; are lowered correctly to an indirect call via a scratch register.5 6target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"7target triple = "x86_64-pc-win64"8 9define void @test_far_call() gc "statepoint-example" {10; CHECK-LABEL: test_far_call:11; CHECK:       # %bb.0: # %entry12; CHECK-NEXT:    pushq %rax13; CHECK-NEXT:    .cfi_def_cfa_offset 1614; CHECK-NEXT:    movabsq $140727162896504, %rax # imm = 0x7FFD988E007815; CHECK-NEXT:    callq *%rax16; CHECK-NEXT:  .Ltmp0:17; CHECK-NEXT:    popq %rax18; CHECK-NEXT:    .cfi_def_cfa_offset 819; CHECK-NEXT:    retq20 21entry:22  %safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) inttoptr (i64 140727162896504 to ptr), i32 0, i32 0, i32 0, i32 0)23  ret void24}25 26declare token @llvm.experimental.gc.statepoint.p0(i64, i32, ptr, i32, i32, ...)27 28