2021-01-13 04:21:22 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
2022-02-04 20:39:52 +08:00
|
|
|
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
|
2021-01-13 04:21:22 +08:00
|
|
|
|
2019-04-17 12:52:47 +08:00
|
|
|
; PR1244
|
|
|
|
|
|
|
|
define i1 @test(i32 %c.3.i, i32 %d.292.2.i) {
|
2021-01-13 04:21:22 +08:00
|
|
|
; CHECK-LABEL: @test(
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = icmp sle i32 [[C_3_I:%.*]], [[D_292_2_I:%.*]]
|
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%tmp266.i = icmp slt i32 %c.3.i, %d.292.2.i
|
|
|
|
%tmp276.i = icmp eq i32 %c.3.i, %d.292.2.i
|
|
|
|
%sel_tmp80 = or i1 %tmp266.i, %tmp276.i
|
|
|
|
ret i1 %sel_tmp80
|
2019-04-17 12:52:47 +08:00
|
|
|
}
|
2021-01-13 03:54:23 +08:00
|
|
|
|
|
|
|
define i1 @test_logical(i32 %c.3.i, i32 %d.292.2.i) {
|
|
|
|
; CHECK-LABEL: @test_logical(
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = icmp sle i32 [[C_3_I:%.*]], [[D_292_2_I:%.*]]
|
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%tmp266.i = icmp slt i32 %c.3.i, %d.292.2.i
|
|
|
|
%tmp276.i = icmp eq i32 %c.3.i, %d.292.2.i
|
|
|
|
%sel_tmp80 = select i1 %tmp266.i, i1 true, i1 %tmp276.i
|
|
|
|
ret i1 %sel_tmp80
|
|
|
|
}
|