1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 ; Tests that the 'nest' parameter attribute causes the relevant parameter to be
6 ; passed in the right register (r11 for PPC).
8 define ptr @nest_receiver(ptr nest %arg) nounwind {
9 ; CHECK-LABEL: nest_receiver:
11 ; CHECK-NEXT: mr 3, 11
17 define ptr @nest_caller(ptr %arg) nounwind {
18 ; CHECK-LABEL: nest_caller:
20 ; CHECK: std 0, 128(1)
21 ; CHECK-NEXT: bl nest_receiver
24 %result = call ptr @nest_receiver(ptr nest %arg)
28 define void @test_indirect(ptr nocapture %f, ptr %p) {
31 ; CHECK-LABEL: test_indirect
32 ; CHECK-DAG: ld [[DEST:[0-9]+]], 0(3)
33 ; CHECK-DAG: ld 2, 8(3)
35 ; CHECK: mtctr [[DEST]]
39 %call = tail call signext i32 %f(ptr nest %p)