brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · 71feb8a Raw
90 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -S -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s3 4define i8 @or-of-constant-with-no-common-bits-set(i8 %x, i8 %y) {5; CHECK-LABEL: 'or-of-constant-with-no-common-bits-set'6; CHECK-NEXT:  Classifying expressions for: @or-of-constant-with-no-common-bits-set7; CHECK-NEXT:    %t0 = shl i8 %x, 28; CHECK-NEXT:    --> (4 * %x) U: [0,-3) S: [-128,125)9; CHECK-NEXT:    %r = or disjoint i8 %t0, 310; CHECK-NEXT:    --> (3 + (4 * %x))<nuw><nsw> U: [3,0) S: [-125,-128)11; CHECK-NEXT:  Determining loop execution counts for: @or-of-constant-with-no-common-bits-set12;13  %t0 = shl i8 %x, 214  %r = or disjoint i8 %t0, 315  ret i8 %r16}17 18define i8 @or-disjoint(i8 %x, i8 %y) {19; CHECK-LABEL: 'or-disjoint'20; CHECK-NEXT:  Classifying expressions for: @or-disjoint21; CHECK-NEXT:    %or = or disjoint i8 %x, %y22; CHECK-NEXT:    --> (%x + %y) U: full-set S: full-set23; CHECK-NEXT:  Determining loop execution counts for: @or-disjoint24;25  %or = or disjoint i8 %x, %y26  ret i8 %or27}28 29define i8 @or-no-disjoint(i8 %x, i8 %y) {30; CHECK-LABEL: 'or-no-disjoint'31; CHECK-NEXT:  Classifying expressions for: @or-no-disjoint32; CHECK-NEXT:    %or = or i8 %x, %y33; CHECK-NEXT:    --> %or U: full-set S: full-set34; CHECK-NEXT:  Determining loop execution counts for: @or-no-disjoint35;36  %or = or i8 %x, %y37  ret i8 %or38}39 40; FIXME: We could add nuw nsw flags here.41define noundef i8 @or-disjoint-transfer-flags(i8 %x, i8 %y) {42; CHECK-LABEL: 'or-disjoint-transfer-flags'43; CHECK-NEXT:  Classifying expressions for: @or-disjoint-transfer-flags44; CHECK-NEXT:    %or = or disjoint i8 %x, %y45; CHECK-NEXT:    --> (%x + %y) U: full-set S: full-set46; CHECK-NEXT:  Determining loop execution counts for: @or-disjoint-transfer-flags47;48  %or = or disjoint i8 %x, %y49  ret i8 %or50}51 52define void @mask-high(i64 %arg, ptr dereferenceable(4) %arg1) {53; CHECK-LABEL: 'mask-high'54; CHECK-NEXT:  Classifying expressions for: @mask-high55; CHECK-NEXT:    %i = load i32, ptr %arg1, align 456; CHECK-NEXT:    --> %i U: full-set S: full-set57; CHECK-NEXT:    %i2 = sext i32 %i to i6458; CHECK-NEXT:    --> (sext i32 %i to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)59; CHECK-NEXT:    %i3 = and i64 %arg, -1660; CHECK-NEXT:    --> (16 * (%arg /u 16))<nuw> U: [0,-15) S: [-9223372036854775808,9223372036854775793)61; CHECK-NEXT:    %i4 = or disjoint i64 1, %i362; CHECK-NEXT:    --> (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw> U: [1,-14) S: [-9223372036854775807,9223372036854775794)63; CHECK-NEXT:    %i7 = phi i64 [ %i4, %bb ], [ %i8, %bb6 ]64; CHECK-NEXT:    --> {(1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>,+,1}<%bb6> U: full-set S: full-set Exits: ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>) LoopDispositions: { %bb6: Computable }65; CHECK-NEXT:    %i8 = add i64 %i7, 166; CHECK-NEXT:    --> {(2 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>,+,1}<%bb6> U: full-set S: full-set Exits: (1 + ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>))<nsw> LoopDispositions: { %bb6: Computable }67; CHECK-NEXT:  Determining loop execution counts for: @mask-high68; CHECK-NEXT:  Loop %bb6: backedge-taken count is (-1 + (-16 * (%arg /u 16)) + ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>))69; CHECK-NEXT:  Loop %bb6: constant max backedge-taken count is i64 -922337203470729216270; CHECK-NEXT:  Loop %bb6: symbolic max backedge-taken count is (-1 + (-16 * (%arg /u 16)) + ((sext i32 %i to i64) smax (1 + (16 * (%arg /u 16))<nuw>)<nuw><nsw>))71; CHECK-NEXT:  Loop %bb6: Trip multiple is 172;73bb:74  %i = load i32, ptr %arg1, align 475  %i2 = sext i32 %i to i6476  %i3 = and i64 %arg, -1677  %i4 = or disjoint i64 1, %i378  %i5 = icmp sgt i64 %i4, %i279  br i1 %i5, label %bb10, label %bb680 81bb6:                                              ; preds = %bb6, %bb82  %i7 = phi i64 [ %i4, %bb ], [ %i8, %bb6 ]83  %i8 = add i64 %i7, 184  %i9 = icmp slt i64 %i7, %i285  br i1 %i9, label %bb6, label %bb1086 87bb10:                                             ; preds = %bb6, %bb88  ret void89}90