[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / PowerPC / ppc-vector-compare.cpp
blobe65acf0439ea145f5298193591aa35f274f60d9a
1 // RUN: %clang_cc1 -flax-vector-conversions=none -target-feature +vsx -triple powerpc64-unknown-unknown -emit-llvm %s \
2 // RUN: -o - | FileCheck %s
4 #include <altivec.h>
6 // CHECK-LABEL: @_Z5test1Dv8_tS_
7 // CHECK: @llvm.ppc.altivec.vcmpequh.p
8 bool test1(vector unsigned short v1, vector unsigned short v2) {
9 return v1 == v2;
12 // CHECK-LABEL: @_Z5test2Dv2_mS_Dv2_lS0_Dv2_yS1_Dv2_xS2_Dv2_dS3_
13 bool test2(vector unsigned long v1, vector unsigned long v2,
14 vector long v3, vector long v4,
15 vector unsigned long long v5, vector unsigned long long v6,
16 vector long long v7, vector long long v8,
17 vector double v9, vector double v10) {
18 // CHECK: @llvm.ppc.altivec.vcmpequd.p
19 bool res = v1 == v2;
21 // CHECK: @llvm.ppc.altivec.vcmpequd.p
22 res |= v3 == v4;
24 // CHECK: @llvm.ppc.altivec.vcmpequd.p
25 res |= v5 == v6;
27 // CHECK: @llvm.ppc.altivec.vcmpequd.p
28 res |= v7 == v8;
30 // CHECK: @llvm.ppc.vsx.xvcmpeqdp.p
31 res |= v9 == v10;
32 return res;