summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-14 18:47:18 +0000
committerChris Lattner <sabre@nondot.org>2011-04-14 18:47:18 +0000
commit6f195469b1cc02d3818947e8c8fe5f3b0cd9ad14 (patch)
tree378d337627f3b8e66d3f643245cbf0bb7bd6b060 /llvm/lib
parentf7b6202e6c4ee09a842b2365ab38a33ce6acf235 (diff)
downloadbcm5719-llvm-6f195469b1cc02d3818947e8c8fe5f3b0cd9ad14.tar.gz
bcm5719-llvm-6f195469b1cc02d3818947e8c8fe5f3b0cd9ad14.zip
move PR9661 out to here.
llvm-svn: 129527
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/README.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt
index 1ac2305e82b..07722f44ec3 100644
--- a/llvm/lib/Target/X86/README.txt
+++ b/llvm/lib/Target/X86/README.txt
@@ -2016,3 +2016,27 @@ We currently generate:
We could save an instruction here by commuting the addss.
//===---------------------------------------------------------------------===//
+
+This (from PR9661):
+
+float clamp_float(float a) {
+ if (a > 1.0f)
+ return 1.0f;
+ else if (a < 0.0f)
+ return 0.0f;
+ else
+ return a;
+}
+
+Could compile to:
+
+clamp_float: # @clamp_float
+ movss .LCPI0_0(%rip), %xmm1
+ minss %xmm1, %xmm0
+ pxor %xmm1, %xmm1
+ maxss %xmm1, %xmm0
+ ret
+
+with -ffast-math.
+
+//===---------------------------------------------------------------------===//
OpenPOWER on IntegriCloud