xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/vrsave-spill.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=powerpc64-apple-darwin -mcpu=g5 | FileCheck %s
2*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
3*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-apple-darwin"
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @foo(<4 x float> %a, <4 x float> %b) nounwind {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker  %c = fadd <4 x float> %a, %b
8*9880d681SAndroid Build Coastguard Worker  %d = fmul <4 x float> %c, %a
9*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "", "~{VRsave}"() nounwind
10*9880d681SAndroid Build Coastguard Worker  br label %return
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker; CHECK: @foo
13*9880d681SAndroid Build Coastguard Worker; CHECK: mfvrsave r{{[0-9]+}}
14*9880d681SAndroid Build Coastguard Worker; CHECK: mtvrsave r{{[0-9]+}}
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Workerreturn:                                           ; preds = %entry
17*9880d681SAndroid Build Coastguard Worker  ret <4 x float> %d
18*9880d681SAndroid Build Coastguard Worker}
19*9880d681SAndroid Build Coastguard Worker
20