-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
Description
| Bugzilla Link | 11334 |
| Resolution | FIXED |
| Resolved on | Sep 30, 2013 09:42 |
| Version | trunk |
| OS | Linux |
| CC | @darkbuck,@ZviRackover |
Extended Description
Consider the following test:
; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=corei7 | FileCheck %s
define <2 x double> @f2d_ext_vec(<2 x float> %v1) nounwind {
entry:
; CHECK: cvtps2pd
%f1 = fpext <2 x float> %v1 to <2 x double>
ret <2 x double> %f1
}
The generated code is:
movdqa %xmm0, %xmm1
cvtss2sd %xmm1, %xmm0
pshufd $1, %xmm1, %xmm1 # xmm1 = xmm1[1,0,0,0]
cvtss2sd %xmm1, %xmm1
unpcklpd %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
ret
A more optimal code would be:
cvtps2pd %xmm0, %xmm0
ret