1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=slp-vectorizer -S %s | FileCheck %s
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "aarch64-unknown-linux-gnu"
define void @foo(ptr %0) {
; CHECK-LABEL: @foo(
; CHECK-NEXT: vector.scevcheck:
; CHECK-NEXT: [[SCEVGEP:%.*]] = getelementptr i8, ptr [[TMP0:%.*]], i64 4
; CHECK-NEXT: [[SCEVGEP3:%.*]] = getelementptr i8, ptr null, i64 4
; CHECK-NEXT: [[TMP1:%.*]] = insertelement <4 x ptr> poison, ptr [[TMP0]], i32 1
; CHECK-NEXT: [[TMP2:%.*]] = insertelement <4 x ptr> [[TMP1]], ptr [[SCEVGEP]], i32 0
; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x ptr> [[TMP2]], <4 x ptr> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
; CHECK-NEXT: [[TMP4:%.*]] = icmp ult <4 x ptr> [[TMP3]], zeroinitializer
; CHECK-NEXT: [[TMP5:%.*]] = and <4 x i1> [[TMP4]], zeroinitializer
; CHECK-NEXT: [[TMP6:%.*]] = insertelement <4 x ptr> poison, ptr [[TMP0]], i32 0
; CHECK-NEXT: [[TMP7:%.*]] = insertelement <4 x ptr> [[TMP6]], ptr [[SCEVGEP3]], i32 1
; CHECK-NEXT: [[TMP8:%.*]] = shufflevector <4 x ptr> [[TMP7]], <4 x ptr> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
; CHECK-NEXT: [[TMP9:%.*]] = icmp ult <4 x ptr> [[TMP8]], zeroinitializer
; CHECK-NEXT: [[TMP10:%.*]] = and <4 x i1> [[TMP9]], zeroinitializer
; CHECK-NEXT: [[TMP11:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP5]])
; CHECK-NEXT: [[TMP12:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> [[TMP10]])
; CHECK-NEXT: [[OP_RDX:%.*]] = or i1 [[TMP11]], [[TMP12]]
; CHECK-NEXT: br i1 [[OP_RDX]], label [[DOTLR_PH:%.*]], label [[VECTOR_PH:%.*]]
; CHECK: vector.ph:
; CHECK-NEXT: ret void
; CHECK: .lr.ph:
; CHECK-NEXT: ret void
;
vector.scevcheck:
%scevgep = getelementptr i8, ptr %0, i64 4
%scevgep3 = getelementptr i8, ptr null, i64 4
%bound011 = icmp ult ptr %scevgep, null
%found.conflict13 = and i1 %bound011, false
%bound014 = icmp ult ptr %scevgep, null
%found.conflict16 = and i1 %bound014, false
%conflict.rdx17 = or i1 %found.conflict13, %found.conflict16
%bound018 = icmp ult ptr %scevgep, null
%found.conflict20 = and i1 %bound018, false
%conflict.rdx21 = or i1 %conflict.rdx17, %found.conflict20
%bound022 = icmp ult ptr %0, null
%found.conflict24 = and i1 %bound022, false
%conflict.rdx25 = or i1 %conflict.rdx21, %found.conflict24
%bound026 = icmp ult ptr %0, null
%found.conflict28 = and i1 %bound026, false
%conflict.rdx29 = or i1 %conflict.rdx25, %found.conflict28
%bound030 = icmp ult ptr %0, null
%found.conflict32 = and i1 %bound030, false
%conflict.rdx33 = or i1 %conflict.rdx29, %found.conflict32
%bound034 = icmp ult ptr %0, null
%found.conflict36 = and i1 %bound034, false
%conflict.rdx37 = or i1 %conflict.rdx33, %found.conflict36
%bound038 = icmp ult ptr %scevgep3, null
%found.conflict40 = and i1 %bound038, false
%conflict.rdx41 = or i1 %conflict.rdx37, %found.conflict40
br i1 %conflict.rdx41, label %.lr.ph, label %vector.ph
vector.ph: ; preds = %vector.scevcheck
ret void
.lr.ph: ; preds = %vector.scevcheck
ret void
}
|