summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2020-01-13 16:28:28 -0500
committerSanjay Patel <spatel@rotateright.com>2020-01-13 16:29:20 -0500
commit80a094e1348ae850cd996e947d70e34abf331685 (patch)
treef6362cea68700ec1c56840eb96ae6005d87409ce /llvm/test/Transforms
parent349636d2bfc39a5c81a835a95d203a42d9f9301a (diff)
downloadbcm5719-llvm-80a094e1348ae850cd996e947d70e34abf331685.tar.gz
bcm5719-llvm-80a094e1348ae850cd996e947d70e34abf331685.zip
[InstCombine] add FMF to tests for more coverage; NFC
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/select.ll12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstCombine/select.ll b/llvm/test/Transforms/InstCombine/select.ll
index cfcae9f4c85..58118911387 100644
--- a/llvm/test/Transforms/InstCombine/select.ll
+++ b/llvm/test/Transforms/InstCombine/select.ll
@@ -1550,12 +1550,12 @@ define <2 x float> @copysign2(<2 x float> %x) {
; CHECK-LABEL: @copysign2(
; CHECK-NEXT: [[I:%.*]] = bitcast <2 x float> [[X:%.*]] to <2 x i32>
; CHECK-NEXT: [[ISNEG:%.*]] = icmp slt <2 x i32> [[I]], zeroinitializer
-; CHECK-NEXT: [[R:%.*]] = select <2 x i1> [[ISNEG]], <2 x float> <float 4.200000e+01, float 4.200000e+01>, <2 x float> <float -4.200000e+01, float -4.200000e+01>
+; CHECK-NEXT: [[R:%.*]] = select nsz <2 x i1> [[ISNEG]], <2 x float> <float 4.200000e+01, float 4.200000e+01>, <2 x float> <float -4.200000e+01, float -4.200000e+01>
; CHECK-NEXT: ret <2 x float> [[R]]
;
%i = bitcast <2 x float> %x to <2 x i32>
%isneg = icmp slt <2 x i32> %i, zeroinitializer
- %r = select <2 x i1> %isneg, <2 x float> <float 42.0, float 42.0>, <2 x float> <float -42.0, float -42.0>
+ %r = select nsz <2 x i1> %isneg, <2 x float> <float 42.0, float 42.0>, <2 x float> <float -42.0, float -42.0>
ret <2 x float> %r
}
@@ -1563,12 +1563,12 @@ define float @copysign3(float %x) {
; CHECK-LABEL: @copysign3(
; CHECK-NEXT: [[I:%.*]] = bitcast float [[X:%.*]] to i32
; CHECK-NEXT: [[ISPOS:%.*]] = icmp sgt i32 [[I]], -1
-; CHECK-NEXT: [[R:%.*]] = select i1 [[ISPOS]], float -4.300000e+01, float 4.300000e+01
+; CHECK-NEXT: [[R:%.*]] = select fast i1 [[ISPOS]], float -4.300000e+01, float 4.300000e+01
; CHECK-NEXT: ret float [[R]]
;
%i = bitcast float %x to i32
%ispos = icmp ult i32 %i, 2147483648
- %r = select i1 %ispos, float -43.0, float 43.0
+ %r = select fast i1 %ispos, float -43.0, float 43.0
ret float %r
}
@@ -1576,12 +1576,12 @@ define float @copysign4(float %x) {
; CHECK-LABEL: @copysign4(
; CHECK-NEXT: [[I:%.*]] = bitcast float [[X:%.*]] to i32
; CHECK-NEXT: [[ISNEG:%.*]] = icmp slt i32 [[I]], 0
-; CHECK-NEXT: [[R:%.*]] = select i1 [[ISNEG]], float -4.400000e+01, float 4.400000e+01
+; CHECK-NEXT: [[R:%.*]] = select nnan arcp i1 [[ISNEG]], float -4.400000e+01, float 4.400000e+01
; CHECK-NEXT: ret float [[R]]
;
%i = bitcast float %x to i32
%isneg = icmp ugt i32 %i, 2147483647
- %r = select i1 %isneg, float -44.0, float 44.0
+ %r = select arcp nnan i1 %isneg, float -44.0, float 44.0
ret float %r
}
OpenPOWER on IntegriCloud