summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-11-07 15:11:32 +0000
committerSanjay Patel <spatel@rotateright.com>2018-11-07 15:11:32 +0000
commit76faf5145df17deff4a278e938918ea71817e74c (patch)
tree8abb4fa04bb46c5d81125a60d379682d88ce40ff /llvm/test/Transforms
parentc006a0ad4b935f14bbe678733c41e42f45b750cc (diff)
downloadbcm5719-llvm-76faf5145df17deff4a278e938918ea71817e74c.tar.gz
bcm5719-llvm-76faf5145df17deff4a278e938918ea71817e74c.zip
[InstCombine] add fold for fabs(X) u< 0.0
The sibling fold for 'oge' --> 'ord' was already here, but this half was missing. The result of fabs() must be positive or nan, so asking if the result is negative or nan is the same as asking if the result is nan. This is another step towards fixing: https://bugs.llvm.org/show_bug.cgi?id=39475 llvm-svn: 346321
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/fcmp.ll3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/test/Transforms/InstCombine/fcmp.ll b/llvm/test/Transforms/InstCombine/fcmp.ll
index e14a56bbcb2..c49ed262ab8 100644
--- a/llvm/test/Transforms/InstCombine/fcmp.ll
+++ b/llvm/test/Transforms/InstCombine/fcmp.ll
@@ -219,8 +219,7 @@ define i1 @fabs_oge(double %a) {
define i1 @fabs_ult(double %a) {
; CHECK-LABEL: @fabs_ult(
-; CHECK-NEXT: [[CALL:%.*]] = call double @llvm.fabs.f64(double [[A:%.*]])
-; CHECK-NEXT: [[CMP:%.*]] = fcmp reassoc arcp ult double [[CALL]], 0.000000e+00
+; CHECK-NEXT: [[CMP:%.*]] = fcmp uno double [[A:%.*]], 0.000000e+00
; CHECK-NEXT: ret i1 [[CMP]]
;
%call = call double @llvm.fabs.f64(double %a)
OpenPOWER on IntegriCloud