Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / X86 / adx-builtins.c
blob563a50b9bc84ebed97f9614a2fc040f83ff0993f
1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -ffreestanding -target-feature +adx -emit-llvm -o - %s | FileCheck %s
3 #include <immintrin.h>
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);