Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / ppc32-varargs-method.cpp
blob475a28b4a1d15843c8d89e39c076e1f7b2d4101c
1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc-unknown-openbsd -emit-llvm -o - %s | FileCheck %s
4 #include <stdarg.h>
6 class something;
7 typedef void (something::*method)();
9 method test(va_list ap) {
10 return va_arg(ap, method);
12 // CHECK: using_regs:
13 // CHECK-NEXT: getelementptr inbounds %struct.__va_list_tag, ptr %{{[0-9]+}}, i32 0, i32 4
14 // CHECK-NEXT: load ptr, ptr %{{[0-9]+}}, align 4
15 // CHECK-NEXT: mul i8 %numUsedRegs, 4
16 // CHECK-NEXT: getelementptr inbounds i8, ptr %{{[0-9]+}}, i8 %{{[0-9]+}}
17 // CHECK-NEXT: add i8 %numUsedRegs, 1
18 // CHECK-NEXT: store i8 %{{[0-9]+}}, ptr %gpr, align 4
19 // CHECK-NEXT: br label %cont