brintos

brintos / llvm-project-archived public Read only

0
0
Text · 714 B · 0abb34c Raw
22 lines · cpp
1// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s2 3typedef __attribute__((__vector_size__(16))) float float4;4typedef __attribute__((__vector_size__(16))) int int4;5typedef __attribute__((__vector_size__(16))) unsigned int uint4;6 7// CHECK: @_Z5test1Dv4_j8int4 test1(uint4 V0) {9  // CHECK: [[CMP0:%.*]] = icmp eq <4 x i32> [[V0:%.*]], zeroinitializer10  // CHECK-NEXT: [[V1:%.*]] = sext <4 x i1> [[CMP0]] to <4 x i32>11  int4 V = !V0;12  return V;13}14 15// CHECK: @_Z5test2Dv4_fS_16int4 test2(float4 V0, float4 V1) {17  // CHECK: [[CMP0:%.*]] = fcmp oeq <4 x float> [[V0:%.*]], zeroinitializer18  // CHECK-NEXT: [[V1:%.*]] = sext <4 x i1> [[CMP0]] to <4 x i32>19  int4 V = !V0;20  return V;21}22