brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 0cacb74 Raw
44 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=loop-idiom < %s -S | FileCheck %s3 4define void @f(ptr nocapture nonnull align 4 dereferenceable(20) %0, i32 %1) local_unnamed_addr #0 align 32 {5; CHECK-LABEL: @f(6; CHECK-NEXT:    [[TMP3:%.*]] = trunc i32 [[TMP1:%.*]] to i27; CHECK-NEXT:    [[TMP4:%.*]] = zext i2 [[TMP3]] to i648; CHECK-NEXT:    [[TMP5:%.*]] = shl nuw nsw i64 [[TMP4]], 29; CHECK-NEXT:    [[SCEVGEP:%.*]] = getelementptr nuw i8, ptr [[TMP0:%.*]], i64 [[TMP5]]10; CHECK-NEXT:    [[TMP6:%.*]] = sub i2 -1, [[TMP3]]11; CHECK-NEXT:    [[TMP7:%.*]] = zext i2 [[TMP6]] to i6412; CHECK-NEXT:    [[TMP8:%.*]] = shl nuw nsw i64 [[TMP7]], 213; CHECK-NEXT:    [[TMP9:%.*]] = add nuw nsw i64 [[TMP8]], 414; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 4 [[SCEVGEP]], i8 0, i64 [[TMP9]], i1 false)15; CHECK-NEXT:    br label [[TMP10:%.*]]16; CHECK:       10:17; CHECK-NEXT:    [[TMP11:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP10]] ], [ [[TMP1]], [[TMP2:%.*]] ]18; CHECK-NEXT:    [[TMP12:%.*]] = and i32 [[TMP11]], 319; CHECK-NEXT:    [[TMP13:%.*]] = zext i32 [[TMP12]] to i6420; CHECK-NEXT:    [[TMP14:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i64 [[TMP13]]21; CHECK-NEXT:    [[TMP15]] = add nsw i32 [[TMP11]], 122; CHECK-NEXT:    [[TMP16:%.*]] = and i32 [[TMP15]], 323; CHECK-NEXT:    [[TMP17:%.*]] = icmp eq i32 [[TMP16]], 024; CHECK-NEXT:    br i1 [[TMP17]], label [[TMP18:%.*]], label [[TMP10]]25; CHECK:       18:26; CHECK-NEXT:    ret void27;28  br label %329 303:                                                ; preds = %3, %131  %4 = phi i32 [ %8, %3 ], [ %1, %2 ]32  %5 = and i32 %4, 333  %6 = zext i32 %5 to i6434  %7 = getelementptr inbounds i32, ptr %0, i64 %635  store i32 0, ptr %7, align 436  %8 = add nsw i32 %4, 137  %9 = and i32 %8, 338  %10 = icmp eq i32 %9, 039  br i1 %10, label %11, label %340 4111:                                               ; preds = %442  ret void43}44