; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck %s
; SCEV would take a long time to compute SCEV expressions for this IR. If SCEV
; finishes in < 1 second then the bug is fixed.
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64--linux-gnu"
define void @smax(i32 %tmp3) {
; CHECK-LABEL: 'smax'
; CHECK-NEXT: Classifying expressions for: @smax
; CHECK-NEXT: %tmp5 = phi i64 [ %tmp62, %bb61 ], [ 0, %entry ]
; CHECK-NEXT: --> {0,+,1}<nuw><nsw><%bb4> U: [0,-9223372036854775808) S: [0,-9223372036854775808) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp6 = trunc i64 %tmp5 to i32
; CHECK-NEXT: --> {0,+,1}<%bb4> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp7 = shl nsw i32 %tmp6, 8
; CHECK-NEXT: --> {0,+,256}<%bb4> U: [0,-255) S: [-2147483648,2147483393) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp8 = sub nsw i32 %tmp3, %tmp7
; CHECK-NEXT: --> {%tmp3,+,-256}<%bb4> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp10 = select i1 %tmp9, i32 %tmp8, i32 256
; CHECK-NEXT: --> (256 smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp11 = add nsw i32 %tmp10, 1
; CHECK-NEXT: --> (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483647,258) S: [-2147483647,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp13 = select i1 %tmp12, i32 %tmp11, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,258) S: [-2147483648,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp15 = select i1 %tmp14, i32 %tmp13, i32 256
; CHECK-NEXT: --> (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp16 = add nsw i32 %tmp15, 1
; CHECK-NEXT: --> (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483647,258) S: [-2147483647,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp18 = select i1 %tmp17, i32 %tmp16, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,258) S: [-2147483648,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp20 = select i1 %tmp19, i32 %tmp18, i32 256
; CHECK-NEXT: --> (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp21 = add nsw i32 %tmp20, 1
; CHECK-NEXT: --> (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483647,258) S: [-2147483647,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp23 = select i1 %tmp22, i32 %tmp21, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,258) S: [-2147483648,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp25 = select i1 %tmp24, i32 %tmp23, i32 256
; CHECK-NEXT: --> (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp26 = add nsw i32 %tmp25, 1
; CHECK-NEXT: --> (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483647,258) S: [-2147483647,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp28 = select i1 %tmp27, i32 %tmp26, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,258) S: [-2147483648,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp30 = select i1 %tmp29, i32 %tmp28, i32 256
; CHECK-NEXT: --> (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp31 = add nsw i32 %tmp30, 1
; CHECK-NEXT: --> (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483647,258) S: [-2147483647,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp33 = select i1 %tmp32, i32 %tmp31, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,258) S: [-2147483648,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp35 = select i1 %tmp34, i32 %tmp33, i32 256
; CHECK-NEXT: --> (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp36 = add nsw i32 %tmp35, 1
; CHECK-NEXT: --> (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483647,258) S: [-2147483647,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp38 = select i1 %tmp37, i32 %tmp36, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,258) S: [-2147483648,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp40 = select i1 %tmp39, i32 %tmp38, i32 256
; CHECK-NEXT: --> (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp41 = add nsw i32 %tmp40, 1
; CHECK-NEXT: --> (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483647,258) S: [-2147483647,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp43 = select i1 %tmp42, i32 %tmp41, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,258) S: [-2147483648,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp44 = add nsw i32 %tmp10, 7
; CHECK-NEXT: --> (7 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> U: [-2147483641,264) S: [-2147483641,264) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp46 = select i1 %tmp45, i32 %tmp43, i32 256
; CHECK-NEXT: --> (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>) U: [-2147483648,257) S: [-2147483648,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp48 = select i1 %tmp47, i32 %tmp44, i32 %tmp46
; CHECK-NEXT: --> ((7 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smax (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin (1 + (256 smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>))<nsw> smin {%tmp3,+,-256}<%bb4>)) U: [-2147483641,264) S: [-2147483641,264) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp49 = ashr i32 %tmp48, 3
; CHECK-NEXT: --> %tmp49 U: [-268435456,268435456) S: [-268435456,268435456) Exits: <<Unknown>> LoopDispositions: { %bb4: Variant, %bb53: Invariant }
; CHECK-NEXT: %tmp51 = select i1 %tmp50, i32 %tmp49, i32 0
; CHECK-NEXT: --> (0 smax %tmp49) U: [0,268435456) S: [0,268435456) Exits: <<Unknown>> LoopDispositions: { %bb4: Variant, %bb53: Invariant }
; CHECK-NEXT: %tmp52 = zext i32 %tmp51 to i64
; CHECK-NEXT: --> (zext i32 (0 smax %tmp49) to i64) U: [0,268435456) S: [0,268435456) Exits: <<Unknown>> LoopDispositions: { %bb4: Variant, %bb53: Invariant }
; CHECK-NEXT: %tmp54 = phi i64 [ undef, %bb4 ], [ %tmp59, %bb53 ]
; CHECK-NEXT: --> {undef,+,1}<nsw><%bb53> U: full-set S: full-set Exits: (-1 + (zext i32 (0 smax %tmp49) to i64))<nsw> LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp55 = trunc i64 %tmp54 to i32
; CHECK-NEXT: --> {(trunc i64 undef to i32),+,1}<%bb53> U: full-set S: full-set Exits: (-1 + (0 smax %tmp49))<nsw> LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp56 = shl nsw i32 %tmp55, 3
; CHECK-NEXT: --> {(8 * (trunc i64 undef to i32)),+,8}<%bb53> U: [0,-7) S: [-2147483648,2147483641) Exits: (-8 + (8 * (0 smax %tmp49))<nuw><nsw>)<nsw> LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp57 = sext i32 %tmp56 to i64
; CHECK-NEXT: --> (sext i32 {(8 * (trunc i64 undef to i32)),+,8}<%bb53> to i64) U: [0,-7) S: [-2147483648,2147483641) Exits: (-8 + (8 * (zext i32 (0 smax %tmp49) to i64))<nuw><nsw>)<nsw> LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp58 = getelementptr inbounds i8, ptr null, i64 %tmp57
; CHECK-NEXT: --> ((sext i32 {(8 * (trunc i64 undef to i32)),+,8}<%bb53> to i64) + null) U: [0,-7) S: [-2147483648,2147483641) Exits: (-8 + (8 * (zext i32 (0 smax %tmp49) to i64))<nuw><nsw> + null) LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp59 = add nsw i64 %tmp54, 1
; CHECK-NEXT: --> {(1 + undef),+,1}<nsw><%bb53> U: full-set S: full-set Exits: (zext i32 (0 smax %tmp49) to i64) LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp62 = add nuw nsw i64 %tmp5, 1
; CHECK-NEXT: --> {1,+,1}<nuw><%bb4> U: [1,0) S: [1,0) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: Determining loop execution counts for: @smax
; CHECK-NEXT: Loop %bb53: backedge-taken count is (-1 + (zext i32 (0 smax %tmp49) to i64) + (-1 * undef))
; CHECK-NEXT: Loop %bb53: constant max backedge-taken count is i64 -1
; CHECK-NEXT: Loop %bb53: symbolic max backedge-taken count is (-1 + (zext i32 (0 smax %tmp49) to i64) + (-1 * undef))
; CHECK-NEXT: Loop %bb53: Trip multiple is 1
; CHECK-NEXT: Loop %bb4: <multiple exits> Unpredictable backedge-taken count.
; CHECK-NEXT: Loop %bb4: Unpredictable constant max backedge-taken count.
; CHECK-NEXT: Loop %bb4: Unpredictable symbolic max backedge-taken count.
;
entry:
br label %bb4
bb4:
%tmp5 = phi i64 [ %tmp62, %bb61 ], [ 0, %entry ]
%tmp6 = trunc i64 %tmp5 to i32
%tmp7 = shl nsw i32 %tmp6, 8
%tmp8 = sub nsw i32 %tmp3, %tmp7
%tmp9 = icmp slt i32 %tmp8, 256
%tmp10 = select i1 %tmp9, i32 %tmp8, i32 256
%tmp11 = add nsw i32 %tmp10, 1
%tmp12 = icmp sgt i32 %tmp8, %tmp11
%tmp13 = select i1 %tmp12, i32 %tmp11, i32 %tmp8
%tmp14 = icmp slt i32 %tmp13, 256
%tmp15 = select i1 %tmp14, i32 %tmp13, i32 256
%tmp16 = add nsw i32 %tmp15, 1
%tmp17 = icmp sgt i32 %tmp8, %tmp16
%tmp18 = select i1 %tmp17, i32 %tmp16, i32 %tmp8
%tmp19 = icmp slt i32 %tmp18, 256
%tmp20 = select i1 %tmp19, i32 %tmp18, i32 256
%tmp21 = add nsw i32 %tmp20, 1
%tmp22 = icmp sgt i32 %tmp8, %tmp21
%tmp23 = select i1 %tmp22, i32 %tmp21, i32 %tmp8
%tmp24 = icmp slt i32 %tmp23, 256
%tmp25 = select i1 %tmp24, i32 %tmp23, i32 256
%tmp26 = add nsw i32 %tmp25, 1
%tmp27 = icmp sgt i32 %tmp8, %tmp26
%tmp28 = select i1 %tmp27, i32 %tmp26, i32 %tmp8
%tmp29 = icmp slt i32 %tmp28, 256
%tmp30 = select i1 %tmp29, i32 %tmp28, i32 256
%tmp31 = add nsw i32 %tmp30, 1
%tmp32 = icmp sgt i32 %tmp8, %tmp31
%tmp33 = select i1 %tmp32, i32 %tmp31, i32 %tmp8
%tmp34 = icmp slt i32 %tmp33, 256
%tmp35 = select i1 %tmp34, i32 %tmp33, i32 256
%tmp36 = add nsw i32 %tmp35, 1
%tmp37 = icmp sgt i32 %tmp8, %tmp36
%tmp38 = select i1 %tmp37, i32 %tmp36, i32 %tmp8
%tmp39 = icmp slt i32 %tmp38, 256
%tmp40 = select i1 %tmp39, i32 %tmp38, i32 256
%tmp41 = add nsw i32 %tmp40, 1
%tmp42 = icmp sgt i32 %tmp8, %tmp41
%tmp43 = select i1 %tmp42, i32 %tmp41, i32 %tmp8
%tmp44 = add nsw i32 %tmp10, 7
%tmp45 = icmp slt i32 %tmp43, 256
%tmp46 = select i1 %tmp45, i32 %tmp43, i32 256
%tmp47 = icmp sgt i32 %tmp44, %tmp46
%tmp48 = select i1 %tmp47, i32 %tmp44, i32 %tmp46
%tmp49 = ashr i32 %tmp48, 3
%tmp50 = icmp sgt i32 %tmp49, 0
%tmp51 = select i1 %tmp50, i32 %tmp49, i32 0
%tmp52 = zext i32 %tmp51 to i64
br label %bb53
bb53:
%tmp54 = phi i64 [ undef, %bb4 ], [ %tmp59, %bb53 ]
%tmp55 = trunc i64 %tmp54 to i32
%tmp56 = shl nsw i32 %tmp55, 3
%tmp57 = sext i32 %tmp56 to i64
%tmp58 = getelementptr inbounds i8, ptr null, i64 %tmp57
store i8 undef, ptr %tmp58, align 8
%tmp59 = add nsw i64 %tmp54, 1
%tmp60 = icmp eq i64 %tmp59, %tmp52
br i1 %tmp60, label %bb61, label %bb53
bb61:
%tmp62 = add nuw nsw i64 %tmp5, 1
br label %bb4
}
define void @umax(i32 %tmp3) {
; CHECK-LABEL: 'umax'
; CHECK-NEXT: Classifying expressions for: @umax
; CHECK-NEXT: %tmp5 = phi i64 [ %tmp62, %bb61 ], [ 0, %entry ]
; CHECK-NEXT: --> {0,+,1}<nuw><nsw><%bb4> U: [0,-9223372036854775808) S: [0,-9223372036854775808) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp6 = trunc i64 %tmp5 to i32
; CHECK-NEXT: --> {0,+,1}<%bb4> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp7 = shl nsw i32 %tmp6, 8
; CHECK-NEXT: --> {0,+,256}<%bb4> U: [0,-255) S: [-2147483648,2147483393) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp8 = sub nsw i32 %tmp3, %tmp7
; CHECK-NEXT: --> {%tmp3,+,-256}<%bb4> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp10 = select i1 %tmp9, i32 %tmp8, i32 256
; CHECK-NEXT: --> (256 umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp11 = add nsw i32 %tmp10, 1
; CHECK-NEXT: --> (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [1,258) S: [1,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp13 = select i1 %tmp12, i32 %tmp11, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,258) S: [0,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp15 = select i1 %tmp14, i32 %tmp13, i32 256
; CHECK-NEXT: --> (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp16 = add nsw i32 %tmp15, 1
; CHECK-NEXT: --> (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [1,258) S: [1,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp18 = select i1 %tmp17, i32 %tmp16, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,258) S: [0,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp20 = select i1 %tmp19, i32 %tmp18, i32 256
; CHECK-NEXT: --> (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp21 = add nsw i32 %tmp20, 1
; CHECK-NEXT: --> (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [1,258) S: [1,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp23 = select i1 %tmp22, i32 %tmp21, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,258) S: [0,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp25 = select i1 %tmp24, i32 %tmp23, i32 256
; CHECK-NEXT: --> (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp26 = add nsw i32 %tmp25, 1
; CHECK-NEXT: --> (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [1,258) S: [1,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp28 = select i1 %tmp27, i32 %tmp26, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,258) S: [0,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp30 = select i1 %tmp29, i32 %tmp28, i32 256
; CHECK-NEXT: --> (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp31 = add nsw i32 %tmp30, 1
; CHECK-NEXT: --> (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [1,258) S: [1,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp33 = select i1 %tmp32, i32 %tmp31, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,258) S: [0,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp35 = select i1 %tmp34, i32 %tmp33, i32 256
; CHECK-NEXT: --> (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp36 = add nsw i32 %tmp35, 1
; CHECK-NEXT: --> (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [1,258) S: [1,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp38 = select i1 %tmp37, i32 %tmp36, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,258) S: [0,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp40 = select i1 %tmp39, i32 %tmp38, i32 256
; CHECK-NEXT: --> (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp41 = add nsw i32 %tmp40, 1
; CHECK-NEXT: --> (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [1,258) S: [1,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp43 = select i1 %tmp42, i32 %tmp41, i32 %tmp8
; CHECK-NEXT: --> ((1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,258) S: [0,258) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp44 = add nsw i32 %tmp10, 7
; CHECK-NEXT: --> (7 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> U: [7,264) S: [7,264) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp46 = select i1 %tmp45, i32 %tmp43, i32 256
; CHECK-NEXT: --> (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>) U: [0,257) S: [0,257) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp48 = select i1 %tmp47, i32 %tmp44, i32 %tmp46
; CHECK-NEXT: --> ((7 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umax (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin (1 + (256 umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>))<nuw><nsw> umin {%tmp3,+,-256}<%bb4>)) U: [7,264) S: [7,264) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: %tmp49 = ashr i32 %tmp48, 3
; CHECK-NEXT: --> %tmp49 U: [-268435456,268435456) S: [-268435456,268435456) Exits: <<Unknown>> LoopDispositions: { %bb4: Variant, %bb53: Invariant }
; CHECK-NEXT: %tmp51 = select i1 %tmp50, i32 %tmp49, i32 0
; CHECK-NEXT: --> %tmp49 U: [-268435456,268435456) S: [-268435456,268435456) Exits: <<Unknown>> LoopDispositions: { %bb4: Variant, %bb53: Invariant }
; CHECK-NEXT: %tmp52 = zext i32 %tmp51 to i64
; CHECK-NEXT: --> (zext i32 %tmp49 to i64) U: [0,4294967296) S: [0,4294967296) Exits: <<Unknown>> LoopDispositions: { %bb4: Variant, %bb53: Invariant }
; CHECK-NEXT: %tmp54 = phi i64 [ undef, %bb4 ], [ %tmp59, %bb53 ]
; CHECK-NEXT: --> {undef,+,1}<nsw><%bb53> U: full-set S: full-set Exits: (-1 + (zext i32 %tmp49 to i64))<nsw> LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp55 = trunc i64 %tmp54 to i32
; CHECK-NEXT: --> {(trunc i64 undef to i32),+,1}<%bb53> U: full-set S: full-set Exits: (-1 + %tmp49)<nsw> LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp56 = shl nsw i32 %tmp55, 3
; CHECK-NEXT: --> {(8 * (trunc i64 undef to i32)),+,8}<%bb53> U: [0,-7) S: [-2147483648,2147483641) Exits: (-8 + (8 * %tmp49)<nsw>) LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp57 = sext i32 %tmp56 to i64
; CHECK-NEXT: --> (sext i32 {(8 * (trunc i64 undef to i32)),+,8}<%bb53> to i64) U: [0,-7) S: [-2147483648,2147483641) Exits: (sext i32 (-8 + (8 * %tmp49)<nsw>) to i64) LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp58 = getelementptr inbounds i8, ptr null, i64 %tmp57
; CHECK-NEXT: --> ((sext i32 {(8 * (trunc i64 undef to i32)),+,8}<%bb53> to i64) + null) U: [0,-7) S: [-2147483648,2147483641) Exits: ((sext i32 (-8 + (8 * %tmp49)<nsw>) to i64) + null) LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp59 = add nsw i64 %tmp54, 1
; CHECK-NEXT: --> {(1 + undef),+,1}<nsw><%bb53> U: full-set S: full-set Exits: (zext i32 %tmp49 to i64) LoopDispositions: { %bb53: Computable, %bb4: Variant }
; CHECK-NEXT: %tmp62 = add nuw nsw i64 %tmp5, 1
; CHECK-NEXT: --> {1,+,1}<nuw><%bb4> U: [1,0) S: [1,0) Exits: <<Unknown>> LoopDispositions: { %bb4: Computable, %bb53: Invariant }
; CHECK-NEXT: Determining loop execution counts for: @umax
; CHECK-NEXT: Loop %bb53: backedge-taken count is (-1 + (zext i32 %tmp49 to i64) + (-1 * undef))
; CHECK-NEXT: Loop %bb53: constant max backedge-taken count is i64 -1
; CHECK-NEXT: Loop %bb53: symbolic max backedge-taken count is (-1 + (zext i32 %tmp49 to i64) + (-1 * undef))
; CHECK-NEXT: Loop %bb53: Trip multiple is 1
; CHECK-NEXT: Loop %bb4: <multiple exits> Unpredictable backedge-taken count.
; CHECK-NEXT: Loop %bb4: Unpredictable constant max backedge-taken count.
; CHECK-NEXT: Loop %bb4: Unpredictable symbolic max backedge-taken count.
;
entry:
br label %bb4
bb4:
%tmp5 = phi i64 [ %tmp62, %bb61 ], [ 0, %entry ]
%tmp6 = trunc i64 %tmp5 to i32
%tmp7 = shl nsw i32 %tmp6, 8
%tmp8 = sub nsw i32 %tmp3, %tmp7
%tmp9 = icmp ult i32 %tmp8, 256
%tmp10 = select i1 %tmp9, i32 %tmp8, i32 256
%tmp11 = add nsw i32 %tmp10, 1
%tmp12 = icmp ugt i32 %tmp8, %tmp11
%tmp13 = select i1 %tmp12, i32 %tmp11, i32 %tmp8
%tmp14 = icmp ult i32 %tmp13, 256
%tmp15 = select i1 %tmp14, i32 %tmp13, i32 256
%tmp16 = add nsw i32 %tmp15, 1
%tmp17 = icmp ugt i32 %tmp8, %tmp16
%tmp18 = select i1 %tmp17, i32 %tmp16, i32 %tmp8
%tmp19 = icmp ult i32 %tmp18, 256
%tmp20 = select i1 %tmp19, i32 %tmp18, i32 256
%tmp21 = add nsw i32 %tmp20, 1
%tmp22 = icmp ugt i32 %tmp8, %tmp21
%tmp23 = select i1 %tmp22, i32 %tmp21, i32 %tmp8
%tmp24 = icmp ult i32 %tmp23, 256
%tmp25 = select i1 %tmp24, i32 %tmp23, i32 256
%tmp26 = add nsw i32 %tmp25, 1
%tmp27 = icmp ugt i32 %tmp8, %tmp26
%tmp28 = select i1 %tmp27, i32 %tmp26, i32 %tmp8
%tmp29 = icmp ult i32 %tmp28, 256
%tmp30 = select i1 %tmp29, i32 %tmp28, i32 256
%tmp31 = add nsw i32 %tmp30, 1
%tmp32 = icmp ugt i32 %tmp8, %tmp31
%tmp33 = select i1 %tmp32, i32 %tmp31, i32 %tmp8
%tmp34 = icmp ult i32 %tmp33, 256
%tmp35 = select i1 %tmp34, i32 %tmp33, i32 256
%tmp36 = add nsw i32 %tmp35, 1
%tmp37 = icmp ugt i32 %tmp8, %tmp36
%tmp38 = select i1 %tmp37, i32 %tmp36, i32 %tmp8
%tmp39 = icmp ult i32 %tmp38, 256
%tmp40 = select i1 %tmp39, i32 %tmp38, i32 256
%tmp41 = add nsw i32 %tmp40, 1
%tmp42 = icmp ugt i32 %tmp8, %tmp41
%tmp43 = select i1 %tmp42, i32 %tmp41, i32 %tmp8
%tmp44 = add nsw i32 %tmp10, 7
%tmp45 = icmp ult i32 %tmp43, 256
%tmp46 = select i1 %tmp45, i32 %tmp43, i32 256
%tmp47 = icmp ugt i32 %tmp44, %tmp46
%tmp48 = select i1 %tmp47, i32 %tmp44, i32 %tmp46
%tmp49 = ashr i32 %tmp48, 3
%tmp50 = icmp ugt i32 %tmp49, 0
%tmp51 = select i1 %tmp50, i32 %tmp49, i32 0
%tmp52 = zext i32 %tmp51 to i64
br label %bb53
bb53:
%tmp54 = phi i64 [ undef, %bb4 ], [ %tmp59, %bb53 ]
%tmp55 = trunc i64 %tmp54 to i32
%tmp56 = shl nsw i32 %tmp55, 3
%tmp57 = sext i32 %tmp56 to i64
%tmp58 = getelementptr inbounds i8, ptr null, i64 %tmp57
store i8 undef, ptr %tmp58, align 8
%tmp59 = add nsw i64 %tmp54, 1
%tmp60 = icmp eq i64 %tmp59, %tmp52
br i1 %tmp60, label %bb61, label %bb53
bb61:
%tmp62 = add nuw nsw i64 %tmp5, 1
br label %bb4
}