llvm/llvm/test/Transforms/DivRemPairs/PowerPC/pr45885.ll

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=div-rem-pairs -S -mtriple=powerpc64-unknown-unknown | FileCheck %s

define void @g() {
; CHECK-LABEL: @g(
; CHECK-NEXT:  if.end:
; CHECK-NEXT:    ret void
; CHECK:       for.cond:
; CHECK-NEXT:    [[TMP0:%.*]] = mul i16 [[DIV_I:%.*]], [[REM_FROZEN:%.*]]
; CHECK-NEXT:    [[REM_DECOMPOSED:%.*]] = sub i16 1, [[TMP0]]
; CHECK-NEXT:    [[REM_FROZEN]] = freeze i16 [[REM_DECOMPOSED]]
; CHECK-NEXT:    [[DIV_I]] = sdiv i16 1, [[REM_FROZEN]]
; CHECK-NEXT:    br label [[FOR_COND:%.*]]
;
if.end:
  ret void

for.cond:                                         ; preds = %for.cond
  %rem = srem i16 1, %rem
  %div.i = sdiv i16 1, %rem
  br label %for.cond
}