Files
clang-p2996/clang/test/CodeGen/win64-i128.c
Nikita Popov 532dc62b90 [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)
This adds -no-opaque-pointers to clang tests whose output will
change when opaque pointers are enabled by default. This is
intended to be part of the migration approach described in
https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9.

The patch has been produced by replacing %clang_cc1 with
%clang_cc1 -no-opaque-pointers for tests that fail with opaque
pointers enabled. Worth noting that this doesn't cover all tests,
there's a remaining ~40 tests not using %clang_cc1 that will need
a followup change.

Differential Revision: https://reviews.llvm.org/D123115
2022-04-07 12:09:47 +02:00

30 lines
1015 B
C

// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-gnu -emit-llvm -o - %s \
// RUN: | FileCheck %s --check-prefix=GNU64
// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc -emit-llvm -o - %s \
// RUN: | FileCheck %s --check-prefix=MSC64
typedef int int128_t __attribute__((mode(TI)));
int128_t foo(void) { return 0; }
// GNU64: define dso_local <2 x i64> @foo()
// MSC64: define dso_local <2 x i64> @foo()
int128_t bar(int128_t a, int128_t b) { return a * b; }
// GNU64: define dso_local <2 x i64> @bar(i128* noundef %0, i128* noundef %1)
// MSC64: define dso_local <2 x i64> @bar(i128* noundef %0, i128* noundef %1)
void vararg(int a, ...) {
// GNU64-LABEL: define{{.*}} void @vararg
// MSC64-LABEL: define{{.*}} void @vararg
__builtin_va_list ap;
__builtin_va_start(ap, a);
int128_t i = __builtin_va_arg(ap, int128_t);
// GNU64: load i128*, i128**
// GNU64: load i128, i128*
// MSC64: load i128*, i128**
// MSC64: load i128, i128*
__builtin_va_end(ap);
}