brintos

brintos / llvm-project-archived public Read only

0
0
Text · 909 B · e6012ab Raw
26 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=instcombine -S | FileCheck %s3 4define i1 @test(i32 %tmp9) {5; CHECK-LABEL: @test(6; CHECK-NEXT:    [[TMP20:%.*]] = icmp ugt i32 [[TMP9:%.*]], 2557; 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 %bothcond13}14 15define i1 @test_logical(i32 %tmp9) {16; CHECK-LABEL: @test_logical(17; CHECK-NEXT:    [[TMP20:%.*]] = icmp ugt i32 [[TMP9:%.*]], 25518; 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 %bothcond24}25 26