Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / vector.cpp
blob0abb34c809d2b974b6db4bb83dbac6c50ba5982e
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
3 typedef __attribute__((__vector_size__(16))) float float4;
4 typedef __attribute__((__vector_size__(16))) int int4;
5 typedef __attribute__((__vector_size__(16))) unsigned int uint4;
7 // CHECK: @_Z5test1Dv4_j
8 int4 test1(uint4 V0) {
9 // CHECK: [[CMP0:%.*]] = icmp eq <4 x i32> [[V0:%.*]], zeroinitializer
10 // CHECK-NEXT: [[V1:%.*]] = sext <4 x i1> [[CMP0]] to <4 x i32>
11 int4 V = !V0;
12 return V;
15 // CHECK: @_Z5test2Dv4_fS_
16 int4 test2(float4 V0, float4 V1) {
17 // CHECK: [[CMP0:%.*]] = fcmp oeq <4 x float> [[V0:%.*]], zeroinitializer
18 // CHECK-NEXT: [[V1:%.*]] = sext <4 x i1> [[CMP0]] to <4 x i32>
19 int4 V = !V0;
20 return V;