brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 6c4ee5b Raw
46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 22; RUN: opt < %s -passes=loop-vectorize -force-vector-width=2 -S | FileCheck %s3 4define void @d() {5; CHECK-LABEL: define void @d() {6; CHECK-NEXT:  entry:7; CHECK-NEXT:    br label [[VECTOR_PH:%.*]]8; CHECK:       vector.ph:9; CHECK-NEXT:    br label [[VECTOR_BODY:%.*]]10; CHECK:       vector.body:11; CHECK-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]12; CHECK-NEXT:    [[TMP0:%.*]] = load float, ptr null, align 413; CHECK-NEXT:    [[BROADCAST_SPLATINSERT:%.*]] = insertelement <2 x float> poison, float [[TMP0]], i64 014; CHECK-NEXT:    [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x float> [[BROADCAST_SPLATINSERT]], <2 x float> poison, <2 x i32> zeroinitializer15; CHECK-NEXT:    [[TMP1:%.*]] = getelementptr float, ptr @d, i64 [[INDEX]]16; CHECK-NEXT:    [[TMP2:%.*]] = call <2 x i1> @llvm.is.fpclass.v2f32(<2 x float> [[BROADCAST_SPLAT]], i32 0)17; CHECK-NEXT:    [[TMP3:%.*]] = select <2 x i1> [[TMP2]], <2 x float> zeroinitializer, <2 x float> splat (float 1.000000e+00)18; CHECK-NEXT:    store <2 x float> [[TMP3]], ptr [[TMP1]], align 419; CHECK-NEXT:    [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 220; CHECK-NEXT:    [[TMP7:%.*]] = icmp eq i64 [[INDEX_NEXT]], 12821; CHECK-NEXT:    br i1 [[TMP7]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]22; CHECK:       middle.block:23; CHECK-NEXT:    br label [[LOOP:%.*]]24; CHECK:       exit:25; CHECK-NEXT:    ret void26;27entry:28  br label %loop29 30loop:31  %i = phi i64 [ 0, %entry ], [ %i7, %loop ]32  %i3 = load float, ptr null, align 433  %i4 = getelementptr float, ptr @d, i64 %i34  %i5 = tail call i1 @llvm.is.fpclass.f32(float %i3, i32 0)35  %i6 = select i1 %i5, float 0.0, float 1.036  store float %i6, ptr %i4, align 437  %i7 = add i64 %i, 138  %i8 = icmp eq i64 %i7, 12839  br i1 %i8, label %exit, label %loop40 41exit:42  ret void43}44 45declare i1 @llvm.is.fpclass.f32(float, i32 immarg)46