1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 define i1 @test(i32 %tmp9) {
6 ; CHECK-NEXT: [[TMP20:%.*]] = icmp ugt i32 [[TMP9:%.*]], 255
7 ; CHECK-NEXT: ret i1 [[TMP20]]
9 %tmp20 = icmp ugt i32 %tmp9, 255 ; <i1> [#uses=1]
10 %tmp11.not = icmp sgt i32 %tmp9, 255 ; <i1> [#uses=1]
11 %bothcond = or i1 %tmp20, %tmp11.not ; <i1> [#uses=1]
15 define i1 @test_logical(i32 %tmp9) {
16 ; CHECK-LABEL: @test_logical(
17 ; CHECK-NEXT: [[TMP20:%.*]] = icmp ugt i32 [[TMP9:%.*]], 255
18 ; CHECK-NEXT: ret i1 [[TMP20]]
20 %tmp20 = icmp ugt i32 %tmp9, 255 ; <i1> [#uses=1]
21 %tmp11.not = icmp sgt i32 %tmp9, 255 ; <i1> [#uses=1]
22 %bothcond = select i1 %tmp20, i1 true, i1 %tmp11.not ; <i1> [#uses=1]