[mlir] Improve error message when number of operands and types differ (#118488)
[llvm-project.git] / clang / test / CodeGen / X86 / rd-builtins.c
blobe01747655e5ee714ce0f0d50fba49f22847c13b0
1 // RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
4 #include <x86intrin.h>
6 unsigned long long test_rdpmc(int a) {
7 return _rdpmc(a);
8 // CHECK: @test_rdpmc
9 // CHECK: call i64 @llvm.x86.rdpmc
12 int test_rdtsc(void) {
13 return _rdtsc();
14 // CHECK: @test_rdtsc
15 // CHECK: call i64 @llvm.x86.rdtsc
18 unsigned long long test_rdtscp(unsigned int *a) {
19 // CHECK: @test_rdtscp
20 // CHECK: [[RDTSCP:%.*]] = call { i64, i32 } @llvm.x86.rdtscp
21 // CHECK: [[TSC_AUX:%.*]] = extractvalue { i64, i32 } [[RDTSCP]], 1
22 // CHECK: store i32 [[TSC_AUX]], ptr %{{.*}}
23 // CHECK: [[TSC:%.*]] = extractvalue { i64, i32 } [[RDTSCP]], 0
24 return __rdtscp(a);