1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes='default<O2>' -S < %s | FileCheck %s
4 define void @PR45687(i32 %0) {
5 ; CHECK-LABEL: @PR45687(
6 ; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[TMP0:%.*]], 1
7 ; CHECK-NEXT: [[TMP3:%.*]] = icmp ult i32 [[TMP2]], 3
8 ; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP3]])
12 %3 = icmp ult i32 %2, 3
13 tail call void @llvm.assume(i1 %3)
14 %4 = icmp slt i32 %0, 0
15 %5 = sub nsw i32 0, %0
16 %6 = select i1 %4, i32 %5, i32 %0
17 %7 = icmp sgt i32 %6, 1
18 br i1 %7, label %8, label %9
26 declare void @llvm.assume(i1)