summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-29 08:37:08 +0000
committerChris Lattner <sabre@nondot.org>2007-12-29 08:37:08 +0000
commit3b6a82118b1e06be54016a8c09a5207ec5148e6c (patch)
tree95f8ab246d83c733f660d39053c7af9c721da7da /llvm/lib/Target
parent33de0c6e92e36f3ea25122d1b304f8658c7b7852 (diff)
downloadbcm5719-llvm-3b6a82118b1e06be54016a8c09a5207ec5148e6c.tar.gz
bcm5719-llvm-3b6a82118b1e06be54016a8c09a5207ec5148e6c.zip
Fold comparisons against a constant nan, and optimize ORD/UNORD
comparisons with a constant. This allows us to compile isnan to: _foo: fcmpu cr7, f1, f1 mfcr r2 rlwinm r3, r2, 0, 31, 31 blr instead of: LCPI1_0: ; float .space 4 _foo: lis r2, ha16(LCPI1_0) lfs f0, lo16(LCPI1_0)(r2) fcmpu cr7, f1, f0 mfcr r2 rlwinm r3, r2, 0, 31, 31 blr llvm-svn: 45405
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/README.txt17
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt
index 08b5875c574..759c7acf389 100644
--- a/llvm/lib/Target/X86/README.txt
+++ b/llvm/lib/Target/X86/README.txt
@@ -816,23 +816,6 @@ _add_zf:
//===---------------------------------------------------------------------===//
-This:
-#include <math.h>
-int foo(double X) { return isnan(X); }
-
-compiles to (-m64):
-
-_foo:
- pxor %xmm1, %xmm1
- ucomisd %xmm1, %xmm0
- setp %al
- movzbl %al, %eax
- ret
-
-the pxor is not needed, we could compare the value against itself.
-
-//===---------------------------------------------------------------------===//
-
These two functions have identical effects:
unsigned int f(unsigned int i, unsigned int n) {++i; if (i == n) ++i; return i;}
OpenPOWER on IntegriCloud