xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/ppc-vaarg-agg.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32"
2*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc-montavista-linux-gnuspe"
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 | FileCheck %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker%struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105 = type { i8, i8, i16, i8*, i8* }
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine fastcc void @test1(%struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105* %args) {
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %repeat, label %maxlen_reached
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Workerrepeat:                                           ; preds = %entry
12*9880d681SAndroid Build Coastguard Worker  switch i32 undef, label %sw.bb323 [
13*9880d681SAndroid Build Coastguard Worker    i32 77, label %sw.bb72
14*9880d681SAndroid Build Coastguard Worker    i32 111, label %sw.bb309
15*9880d681SAndroid Build Coastguard Worker    i32 80, label %sw.bb313
16*9880d681SAndroid Build Coastguard Worker    i32 117, label %sw.bb326
17*9880d681SAndroid Build Coastguard Worker    i32 88, label %sw.bb321
18*9880d681SAndroid Build Coastguard Worker  ]
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Workersw.bb72:                                          ; preds = %repeat
21*9880d681SAndroid Build Coastguard Worker  unreachable
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Workersw.bb309:                                         ; preds = %repeat
24*9880d681SAndroid Build Coastguard Worker  unreachable
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workersw.bb313:                                         ; preds = %repeat
27*9880d681SAndroid Build Coastguard Worker  unreachable
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Workersw.bb321:                                         ; preds = %repeat
30*9880d681SAndroid Build Coastguard Worker  unreachable
31*9880d681SAndroid Build Coastguard Worker
32*9880d681SAndroid Build Coastguard Workersw.bb323:                                         ; preds = %repeat
33*9880d681SAndroid Build Coastguard Worker  %0 = va_arg %struct.__va_list_tag.0.9.18.23.32.41.48.55.62.67.72.77.82.87.90.93.96.101.105* %args, i32
34*9880d681SAndroid Build Coastguard Worker  unreachable
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Workersw.bb326:                                         ; preds = %repeat
37*9880d681SAndroid Build Coastguard Worker  unreachable
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Workermaxlen_reached:                                   ; preds = %entry
40*9880d681SAndroid Build Coastguard Worker  ret void
41*9880d681SAndroid Build Coastguard Worker}
42*9880d681SAndroid Build Coastguard Worker
43*9880d681SAndroid Build Coastguard Worker; If the SD nodes are not cleaup up correctly, then this can fail to compile
44*9880d681SAndroid Build Coastguard Worker; with an error like:  Cannot select: ch = setlt [ID=6]
45*9880d681SAndroid Build Coastguard Worker; CHECK: @test1
46*9880d681SAndroid Build Coastguard Worker
47