llvm/llvm/test/Transforms/LoopStrengthReduce/X86/pr83404.ll

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
; RUN: opt -S -passes=loop-reduce -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s

; Make sure this does not assert.
define void @test() {
; CHECK-LABEL: define void @test() {
; CHECK-NEXT:  entry:
; CHECK-NEXT:    br label [[FOR_BODY:%.*]]
; CHECK:       for.body:
; CHECK-NEXT:    br label [[FOR_BODY]]
;
entry:
  br label %for.body

for.body:
  %0 = phi i64 [ %dec, %for.body ], [ 0, %entry ]
  %h.18 = phi i32 [ 1, %for.body ], [ 0, %entry ]
  %dec = add i64 %0, 1
  %rem = urem i64 %0, 5
  %1 = trunc i64 %rem to i32
  %tobool3.not = icmp eq i32 %h.18, %1
  br label %for.body
}