xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/varargs-struct-float.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mcpu=pwr7 -O0 < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*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"
4*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker%struct.Sf1 = type { float }
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdefine void @foo(float inreg %s.coerce) nounwind {
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker  %s = alloca %struct.Sf1, align 4
11*9880d681SAndroid Build Coastguard Worker  %coerce.dive = getelementptr %struct.Sf1, %struct.Sf1* %s, i32 0, i32 0
12*9880d681SAndroid Build Coastguard Worker  store float %s.coerce, float* %coerce.dive, align 1
13*9880d681SAndroid Build Coastguard Worker  %coerce.dive1 = getelementptr %struct.Sf1, %struct.Sf1* %s, i32 0, i32 0
14*9880d681SAndroid Build Coastguard Worker  %0 = load float, float* %coerce.dive1, align 1
15*9880d681SAndroid Build Coastguard Worker  call void (i32, ...) @testvaSf1(i32 1, float inreg %0)
16*9880d681SAndroid Build Coastguard Worker  ret void
17*9880d681SAndroid Build Coastguard Worker}
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker; CHECK: stfs {{[0-9]+}}, 116(1)
20*9880d681SAndroid Build Coastguard Worker; CHECK: lwz 4, 116(1)
21*9880d681SAndroid Build Coastguard Worker; CHECK: bl
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Workerdeclare void @testvaSf1(i32, ...)
24