[llvm-commits] [llvm] r93373 - in /llvm/trunk/lib/Target/X86: README-SSE.txt README.txt

Nick Lewycky nicholas at mxc.ca
Wed Jan 13 21:30:30 PST 2010


Chris Lattner wrote:
> Author: lattner
> Date: Wed Jan 13 17:29:11 2010
> New Revision: 93373
>
> URL: http://llvm.org/viewvc/llvm-project?rev=93373&view=rev
> Log:
> this is an SSE-specific issue.

It is? We don't want to convert the branch into a switch in the IR?

Nick

>
> Modified:
>      llvm/trunk/lib/Target/X86/README-SSE.txt
>      llvm/trunk/lib/Target/X86/README.txt
>
> Modified: llvm/trunk/lib/Target/X86/README-SSE.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=93373&r1=93372&r2=93373&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/README-SSE.txt (original)
> +++ llvm/trunk/lib/Target/X86/README-SSE.txt Wed Jan 13 17:29:11 2010
> @@ -916,3 +916,23 @@
>   "load, add 1.0, store" is better done in the fp stack, etc.
>
>   //===---------------------------------------------------------------------===//
> +
> +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.
> +
> +//===---------------------------------------------------------------------===//
> +
>
> Modified: llvm/trunk/lib/Target/X86/README.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=93373&r1=93372&r2=93373&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/README.txt (original)
> +++ llvm/trunk/lib/Target/X86/README.txt Wed Jan 13 17:29:11 2010
> @@ -1868,23 +1868,3 @@
>   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.
> -
> -//===---------------------------------------------------------------------===//
> -
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list