1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -loop-vectorize --force-vector-width=4 --force-vector-interleave=0 -S -o - < %s | FileCheck %s 3 4target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 5target triple = "x86_64-unknown-linux-gnu" 6 7%0 = type { i32 } 8%1 = type { i64 } 9 10define void @foo(i64* %p, i64* %p.last) unnamed_addr #0 { 11; CHECK-LABEL: @foo( 12; CHECK: vector.body: 13; CHECK: [[WIDE_MASKED_GATHER:%.*]] = call <4 x %0*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.0(<4 x %0**> [[TMP11:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %0*> undef) 14; CHECK-NEXT: [[WIDE_MASKED_GATHER5:%.*]] = call <4 x %0*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.0(<4 x %0**> [[TMP12:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %0*> undef) 15; CHECK-NEXT: [[WIDE_MASKED_GATHER6:%.*]] = call <4 x %0*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.0(<4 x %0**> [[TMP13:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %0*> undef) 16; CHECK-NEXT: [[WIDE_MASKED_GATHER7:%.*]] = call <4 x %0*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.0(<4 x %0**> [[TMP14:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %0*> undef) 17; 18entry: 19 br label %loop 20 21loop: 22 %p2 = phi i64* [ %p, %entry ], [ %p.inc, %loop ] 23 %p.inc = getelementptr inbounds i64, i64* %p2, i64 128 24 %p3 = bitcast i64* %p2 to %0** 25 %v = load %0*, %0** %p3, align 8 26 %b = icmp eq i64* %p.inc, %p.last 27 br i1 %b, label %exit, label %loop 28 29exit: 30 ret void 31} 32 33define void @bar(i64* %p, i64* %p.last) unnamed_addr #0 { 34; CHECK-LABEL: @bar( 35; CHECK: vector.body: 36; CHECK: [[WIDE_MASKED_GATHER:%.*]] = call <4 x %1*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.1(<4 x %1**> [[TMP11:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %1*> undef) 37; CHECK-NEXT: [[WIDE_MASKED_GATHER5:%.*]] = call <4 x %1*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.1(<4 x %1**> [[TMP12:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %1*> undef) 38; CHECK-NEXT: [[WIDE_MASKED_GATHER6:%.*]] = call <4 x %1*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.1(<4 x %1**> [[TMP13:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %1*> undef) 39; CHECK-NEXT: [[WIDE_MASKED_GATHER7:%.*]] = call <4 x %1*> @llvm.masked.gather.v4p0s_s.v4p0p0s_s.1(<4 x %1**> [[TMP14:%.*]], i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x %1*> undef) 40; 41entry: 42 br label %loop 43 44loop: 45 %p2 = phi i64* [ %p, %entry ], [ %p.inc, %loop ] 46 %p.inc = getelementptr inbounds i64, i64* %p2, i64 128 47 %p3 = bitcast i64* %p2 to %1** 48 %v = load %1*, %1** %p3, align 8 49 %b = icmp eq i64* %p.inc, %p.last 50 br i1 %b, label %exit, label %loop 51 52exit: 53 ret void 54} 55 56attributes #0 = { "target-cpu"="skylake" } 57 58