2016-06-29 02:33:10 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
2012-06-06 09:38:32 +08:00
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
2008-10-15 01:15:11 +08:00
|
|
|
|
2017-09-12 23:29:28 +08:00
|
|
|
define i1 @PR1738(double %x, double %y) {
|
|
|
|
; CHECK-LABEL: @PR1738(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ord double [[X:%.*]], [[Y:%.*]]
|
2017-09-12 23:29:28 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp1 = fcmp ord double %x, 0.0
|
|
|
|
%cmp2 = fcmp ord double %y, 0.0
|
|
|
|
%and = and i1 %cmp1, %cmp2
|
|
|
|
ret i1 %and
|
|
|
|
}
|
|
|
|
|
2018-03-26 01:48:20 +08:00
|
|
|
define <2 x i1> @PR1738_vec_undef(<2 x double> %x, <2 x double> %y) {
|
|
|
|
; CHECK-LABEL: @PR1738_vec_undef(
|
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ord <2 x double> [[X:%.*]], [[Y:%.*]]
|
|
|
|
; CHECK-NEXT: ret <2 x i1> [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp1 = fcmp ord <2 x double> %x, <double 0.0, double undef>
|
|
|
|
%cmp2 = fcmp ord <2 x double> %y, <double undef, double 0.0>
|
|
|
|
%or = and <2 x i1> %cmp1, %cmp2
|
|
|
|
ret <2 x i1> %or
|
|
|
|
}
|
|
|
|
|
2017-09-12 23:29:28 +08:00
|
|
|
define i1 @PR15737(float %a, double %b) {
|
|
|
|
; CHECK-LABEL: @PR15737(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float [[A:%.*]], 0.000000e+00
|
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ord double [[B:%.*]], 0.000000e+00
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: [[AND:%.*]] = and i1 [[CMP]], [[CMP1]]
|
|
|
|
; CHECK-NEXT: ret i1 [[AND]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ord float %a, 0.000000e+00
|
|
|
|
%cmp1 = fcmp ord double %b, 0.000000e+00
|
|
|
|
%and = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %and
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i1> @t9(<2 x float> %a, <2 x double> %b) {
|
|
|
|
; CHECK-LABEL: @t9(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP:%.*]] = fcmp ord <2 x float> [[A:%.*]], zeroinitializer
|
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ord <2 x double> [[B:%.*]], zeroinitializer
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: [[AND:%.*]] = and <2 x i1> [[CMP]], [[CMP1]]
|
|
|
|
; CHECK-NEXT: ret <2 x i1> [[AND]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ord <2 x float> %a, zeroinitializer
|
|
|
|
%cmp1 = fcmp ord <2 x double> %b, zeroinitializer
|
|
|
|
%and = and <2 x i1> %cmp, %cmp1
|
|
|
|
ret <2 x i1> %and
|
|
|
|
}
|
|
|
|
|
2017-09-03 23:35:10 +08:00
|
|
|
define i1 @fcmp_ord_nonzero(float %x, float %y) {
|
|
|
|
; CHECK-LABEL: @fcmp_ord_nonzero(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ord float [[X:%.*]], [[Y:%.*]]
|
2017-09-03 23:35:10 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp1 = fcmp ord float %x, 1.0
|
|
|
|
%cmp2 = fcmp ord float %y, 2.0
|
|
|
|
%and = and i1 %cmp1, %cmp2
|
|
|
|
ret i1 %and
|
|
|
|
}
|
|
|
|
|
|
|
|
define <3 x i1> @fcmp_ord_nonzero_vec(<3 x float> %x, <3 x float> %y) {
|
|
|
|
; CHECK-LABEL: @fcmp_ord_nonzero_vec(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ord <3 x float> [[X:%.*]], [[Y:%.*]]
|
2017-09-06 07:13:13 +08:00
|
|
|
; CHECK-NEXT: ret <3 x i1> [[TMP1]]
|
2017-09-03 23:35:10 +08:00
|
|
|
;
|
|
|
|
%cmp1 = fcmp ord <3 x float> %x, <float 1.0, float 2.0, float 3.0>
|
|
|
|
%cmp2 = fcmp ord <3 x float> %y, <float 3.0, float 2.0, float 1.0>
|
|
|
|
%and = and <3 x i1> %cmp1, %cmp2
|
|
|
|
ret <3 x i1> %and
|
|
|
|
}
|
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_0(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_0(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp false double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_1(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_1(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp oeq double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_2(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_2(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
2016-06-29 02:33:10 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp oeq double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2008-10-15 01:15:11 +08:00
|
|
|
}
|
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_3(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_3(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-29 02:33:10 +08:00
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp ogt double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2008-10-15 01:15:11 +08:00
|
|
|
}
|
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_4(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_4(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ogt double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_5(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_5(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ogt double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_6(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_6(
|
2016-06-29 02:33:10 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp oge double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2008-10-15 01:15:11 +08:00
|
|
|
}
|
2008-10-15 02:13:38 +08:00
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_7(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_7(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-29 02:33:10 +08:00
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp oge double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2008-10-15 02:13:38 +08:00
|
|
|
}
|
2012-06-06 10:12:17 +08:00
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_8(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_8(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp oge double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_9(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_9(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oge double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp oge double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_10(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_10(
|
2016-06-29 02:33:10 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp olt double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_11(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_11(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp olt double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_12(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_12(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp olt double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_13(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_13(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp olt double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2012-06-06 10:12:17 +08:00
|
|
|
}
|
2012-06-07 01:22:40 +08:00
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_14(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_14(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp olt double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_15(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_15(
|
2016-06-29 02:33:10 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp ole double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2012-06-07 01:22:40 +08:00
|
|
|
}
|
2012-06-14 13:57:42 +08:00
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_16(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_16(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-29 02:33:10 +08:00
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp ole double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2012-06-14 13:57:42 +08:00
|
|
|
}
|
2013-04-13 05:56:23 +08:00
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_17(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_17(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-29 02:33:10 +08:00
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp ole double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2013-04-13 05:56:23 +08:00
|
|
|
}
|
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_18(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_18(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-29 02:33:10 +08:00
|
|
|
;
|
2016-06-30 01:55:11 +08:00
|
|
|
%cmp = fcmp ole double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_19(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_19(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ole double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_20(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_20(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ole double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ole double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_21(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_21(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp one double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_22(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_22(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp one double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_23(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_23(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp one double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_24(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_24(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp one double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_25(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_25(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp one double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_26(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_26(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp one double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_27(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_27(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp one double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp one double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_28(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_28(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_29(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_29(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_30(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_30(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_31(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_31(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oge double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_32(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_32(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_33(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_33(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ole double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_34(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_34(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp one double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_35(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_35(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ord double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ord double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_36(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_36(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_37(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_37(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_38(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_38(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_39(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_39(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_40(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_40(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_41(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_41(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_42(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_42(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_43(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_43(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_44(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_44(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ueq double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ueq double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_45(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_45(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_46(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_46(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_47(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_47(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_48(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_48(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_49(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_49(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_50(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_50(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_51(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_51(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_52(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_52(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_53(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_53(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_54(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_54(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ugt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ugt double %a, %b
|
|
|
|
%cmp1 = fcmp ugt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_55(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_55(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_56(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_56(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_57(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_57(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_58(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_58(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oge double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_59(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_59(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_60(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_60(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_61(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_61(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_62(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_62(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oge double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_63(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_63(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ueq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_64(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_64(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ugt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp ugt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_65(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_65(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uge double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp uge double %a, %b
|
|
|
|
%cmp1 = fcmp uge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_66(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_66(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_67(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_67(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_68(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_68(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
2013-04-13 05:56:23 +08:00
|
|
|
}
|
2016-06-29 02:33:10 +08:00
|
|
|
|
2016-06-30 01:55:11 +08:00
|
|
|
define i1 @auto_gen_69(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_69(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_70(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_70(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_71(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_71(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_72(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_72(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_73(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_73(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_74(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_74(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_75(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_75(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp ugt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_76(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_76(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp uge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_77(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_77(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ult double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ult double %a, %b
|
|
|
|
%cmp1 = fcmp ult double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_78(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_78(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_79(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_79(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_80(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_80(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_81(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_81(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_82(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_82(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_83(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_83(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ole double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_84(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_84(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_85(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_85(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ole double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_86(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_86(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ueq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_87(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_87(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp ugt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_88(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_88(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ueq double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp uge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_89(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_89(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ult double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp ult double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_90(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_90(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ule double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp ule double %a, %b
|
|
|
|
%cmp1 = fcmp ule double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_91(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_91(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_92(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_92(
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 false
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_93(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_93(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_94(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_94(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_95(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_95(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_96(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_96(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_97(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_97(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp one double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_98(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_98(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp one double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_99(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_99(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_100(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_100(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ugt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp ugt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_101(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_101(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ugt double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp uge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_102(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_102(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ult double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp ult double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_103(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_103(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ult double [[A:%.*]], [[B:%.*]]
|
[InstCombine] Simplify and correct folding fcmps with the same children
Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants.
Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that.
Reviewers: spatel
Subscribers: llvm-commits, iteratee, echristo
Differential Revision: http://reviews.llvm.org/D21775
llvm-svn: 274156
2016-06-30 04:10:17 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp ule double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_104(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_104(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp une double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp une double %a, %b
|
|
|
|
%cmp1 = fcmp une double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_105(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_105(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_106(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_106(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_107(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_107(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_108(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_108(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_109(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_109(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_110(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_110(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_111(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_111(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_112(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_112(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_113(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_113(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_114(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_114(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp ugt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_115(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_115(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp uge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_116(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_116(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp ult double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_117(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_117(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp ule double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_118(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_118(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 04:10:13 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
2016-06-30 01:55:11 +08:00
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp une double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_119(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_119(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[TMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp uno double %a, %b
|
|
|
|
%cmp1 = fcmp uno double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_120(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_120(
|
|
|
|
; CHECK-NEXT: ret i1 false
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp false double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_121(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_121(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp oeq double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp oeq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_122(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_122(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ogt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp ogt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_123(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_123(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp oge double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp oge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_124(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_124(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp olt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp olt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_125(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_125(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ole double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp ole double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_126(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_126(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp one double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp one double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_127(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_127(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ord double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp ord double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_128(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_128(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ueq double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp ueq double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_129(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_129(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ugt double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp ugt double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_130(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_130(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp uge double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp uge double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_131(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_131(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ult double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp ult double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_132(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_132(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ule double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp ule double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_133(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_133(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp une double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp une double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_134(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_134(
|
2018-03-26 01:48:20 +08:00
|
|
|
; CHECK-NEXT: [[CMP1:%.*]] = fcmp uno double [[A:%.*]], [[B:%.*]]
|
2016-06-30 01:55:11 +08:00
|
|
|
; CHECK-NEXT: ret i1 [[CMP1]]
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp uno double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @auto_gen_135(double %a, double %b) {
|
|
|
|
; CHECK-LABEL: @auto_gen_135(
|
|
|
|
; CHECK-NEXT: ret i1 true
|
|
|
|
;
|
|
|
|
%cmp = fcmp true double %a, %b
|
|
|
|
%cmp1 = fcmp true double %a, %b
|
|
|
|
%retval = and i1 %cmp, %cmp1
|
|
|
|
ret i1 %retval
|
|
|
|
}
|