summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-01-12 19:06:35 +0000
committerSanjay Patel <spatel@rotateright.com>2016-01-12 19:06:35 +0000
commit53ba88dbb042132bbaf7e5ca6ccc2d5051272581 (patch)
tree70b2762ffa49886f774ef53b8d8902e262cf39fb /llvm/test/Transforms
parent87b0fe075ea2573a0009ceef8cc84f05f7b2f782 (diff)
downloadbcm5719-llvm-53ba88dbb042132bbaf7e5ca6ccc2d5051272581.tar.gz
bcm5719-llvm-53ba88dbb042132bbaf7e5ca6ccc2d5051272581.zip
[LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, 0.5) calls
Also, propagate the FMF to the newly created sqrt() call. llvm-svn: 257503
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/pow-sqrt.ll14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/test/Transforms/InstCombine/pow-sqrt.ll b/llvm/test/Transforms/InstCombine/pow-sqrt.ll
index 8fc74e4a002..1e6166c5f11 100644
--- a/llvm/test/Transforms/InstCombine/pow-sqrt.ll
+++ b/llvm/test/Transforms/InstCombine/pow-sqrt.ll
@@ -1,15 +1,13 @@
; RUN: opt < %s -instcombine -S | FileCheck %s
-define double @mypow(double %x) #0 {
-entry:
- %pow = call double @llvm.pow.f64(double %x, double 5.000000e-01)
+define double @pow_half(double %x) {
+ %pow = call fast double @llvm.pow.f64(double %x, double 5.000000e-01)
ret double %pow
}
-; CHECK-LABEL: define double @mypow(
-; CHECK: %sqrt = call double @sqrt(double %x) #1
-; CHECK: ret double %sqrt
-; CHECK: }
+; CHECK-LABEL: define double @pow_half(
+; CHECK-NEXT: %sqrt = call fast double @sqrt(double %x)
+; CHECK-NEXT: ret double %sqrt
declare double @llvm.pow.f64(double, double)
-attributes #0 = { "unsafe-fp-math"="true" }
+
OpenPOWER on IntegriCloud