1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -slp-vectorizer -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7-avx | FileCheck %s
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
5 target triple = "x86_64-apple-macosx10.8.0"
7 ; Make sure that we are not crashing or changing the code.
8 define void @test(<4 x i32> %in, <4 x i32> %in2) {
10 ; CHECK-NEXT: [[K:%.*]] = icmp eq <4 x i32> [[IN:%.*]], [[IN2:%.*]]
11 ; CHECK-NEXT: ret void
13 %k = icmp eq <4 x i32> %in, %in2
17 define i1 @cmpv2f32(<2 x i32> %x, <2 x i32> %y) {
18 ; CHECK-LABEL: @cmpv2f32(
20 ; CHECK-NEXT: [[X0:%.*]] = extractelement <2 x i32> [[X:%.*]], i32 0
21 ; CHECK-NEXT: [[Y0:%.*]] = extractelement <2 x i32> [[Y:%.*]], i32 0
22 ; CHECK-NEXT: [[CMP0:%.*]] = icmp eq i32 [[X0]], [[Y0]]
23 ; CHECK-NEXT: br i1 [[CMP0]], label [[IF:%.*]], label [[ENDIF:%.*]]
25 ; CHECK-NEXT: [[X1:%.*]] = extractelement <2 x i32> [[X]], i32 1
26 ; CHECK-NEXT: [[Y1:%.*]] = extractelement <2 x i32> [[Y]], i32 1
27 ; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 [[X1]], [[Y1]]
28 ; CHECK-NEXT: br label [[ENDIF]]
30 ; CHECK-NEXT: [[AND_OF_CMPS:%.*]] = phi i1 [ false, [[ENTRY:%.*]] ], [ [[CMP1]], [[IF]] ]
31 ; CHECK-NEXT: ret i1 [[AND_OF_CMPS]]
34 %x0 = extractelement <2 x i32> %x, i32 0
35 %y0 = extractelement <2 x i32> %y, i32 0
36 %cmp0 = icmp eq i32 %x0, %y0
37 br i1 %cmp0, label %if, label %endif
40 %x1 = extractelement <2 x i32> %x, i32 1
41 %y1 = extractelement <2 x i32> %y, i32 1
42 %cmp1 = icmp eq i32 %x1, %y1
46 %and_of_cmps = phi i1 [ false, %entry ], [ %cmp1, %if ]