From fb534d97b50cb4670a57c3153bf545a306e4ac79 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 13 Jan 2010 23:28:40 +0000 Subject: [PATCH] X86 if conversion + tail merging issues from PR6032. llvm-svn: 93372 --- llvm/lib/Target/X86/README.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index aa7bb3d97889..f146ff363457 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -1868,3 +1868,23 @@ carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix. //===---------------------------------------------------------------------===// + +The X86 backend should be able to if-convert SSE comparisons like "ucomisd" to +"cmpsd". For example, this code: + +double d1(double x) { return x == x ? x : x + x; } + +Compiles into: + +_d1: + ucomisd %xmm0, %xmm0 + jnp LBB1_2 + addsd %xmm0, %xmm0 + ret +LBB1_2: + ret + +Also, the 'ret's should be shared. This is PR6032. + +//===---------------------------------------------------------------------===// +