1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin8 < %s | FileCheck %s --check-prefix=X64 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-pc-linux < %s | FileCheck %s --check-prefix=X64 3*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=i686-pc-linux < %s | FileCheck %s --check-prefix=X86 4*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin8 -terminal-rule < %s | FileCheck %s --check-prefix=X64 5*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-pc-linux -terminal-rule < %s | FileCheck %s --check-prefix=X64 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdefine void @sret_void(i32* sret %p) { 8*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %p 9*9880d681SAndroid Build Coastguard Worker ret void 10*9880d681SAndroid Build Coastguard Worker} 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker; X64-LABEL: sret_void 13*9880d681SAndroid Build Coastguard Worker; X64-DAG: movl $0, (%rdi) 14*9880d681SAndroid Build Coastguard Worker; X64-DAG: movq %rdi, %rax 15*9880d681SAndroid Build Coastguard Worker; X64: retq 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker; X86-LABEL: sret_void 18*9880d681SAndroid Build Coastguard Worker; X86: movl 4(%esp), %eax 19*9880d681SAndroid Build Coastguard Worker; X86: movl $0, (%eax) 20*9880d681SAndroid Build Coastguard Worker; X86: retl 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Workerdefine i256 @sret_demoted() { 23*9880d681SAndroid Build Coastguard Worker ret i256 0 24*9880d681SAndroid Build Coastguard Worker} 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker; X64-LABEL: sret_demoted 27*9880d681SAndroid Build Coastguard Worker; X64-DAG: movq $0, (%rdi) 28*9880d681SAndroid Build Coastguard Worker; X64-DAG: movq %rdi, %rax 29*9880d681SAndroid Build Coastguard Worker; X64: retq 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker; X86-LABEL: sret_demoted 32*9880d681SAndroid Build Coastguard Worker; X86: movl 4(%esp), %eax 33*9880d681SAndroid Build Coastguard Worker; X86: movl $0, (%eax) 34*9880d681SAndroid Build Coastguard Worker; X86: retl 35