1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt < %s -passes=instcombine -S | FileCheck %s 3 4define i1 @test(i32 %tmp9) { 5; CHECK-LABEL: @test( 6; CHECK-NEXT: [[TMP20:%.*]] = icmp ugt i32 [[TMP9:%.*]], 255 7; CHECK-NEXT: ret i1 [[TMP20]] 8; 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] 12 ret i1 %bothcond 13} 14 15define 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]] 19; 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] 23 ret i1 %bothcond 24} 25 26