1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -ffreestanding -target-feature +adx -emit-llvm -o - %s | FileCheck %s
5 unsigned char test_addcarryx_u32(unsigned char __cf
, unsigned int __x
,
6 unsigned int __y
, unsigned int *__p
) {
7 // CHECK-LABEL: test_addcarryx_u32
8 // CHECK: [[ADC:%.*]] = call { i8, i32 } @llvm.x86.addcarry.32
9 // CHECK: [[DATA:%.*]] = extractvalue { i8, i32 } [[ADC]], 1
10 // CHECK: store i32 [[DATA]], ptr %{{.*}}
11 // CHECK: [[CF:%.*]] = extractvalue { i8, i32 } [[ADC]], 0
12 return _addcarryx_u32(__cf
, __x
, __y
, __p
);
15 unsigned char test_addcarryx_u64(unsigned char __cf
, unsigned long long __x
,
16 unsigned long long __y
,
17 unsigned long long *__p
) {
18 // CHECK-LABEL: test_addcarryx_u64
19 // CHECK: [[ADC:%.*]] = call { i8, i64 } @llvm.x86.addcarry.64
20 // CHECK: [[DATA:%.*]] = extractvalue { i8, i64 } [[ADC]], 1
21 // CHECK: store i64 [[DATA]], ptr %{{.*}}
22 // CHECK: [[CF:%.*]] = extractvalue { i8, i64 } [[ADC]], 0
23 return _addcarryx_u64(__cf
, __x
, __y
, __p
);