aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-03 16:09:33 +0000
committerChris Lattner <sabre@nondot.org>2007-08-03 16:09:33 +0000
commit5cc2e45e2df0a4fa6a7134f31a38176ce9bf7e58 (patch)
tree5f40387888603e0e0091607223c14d064b8904b8 /CodeGen/CodeGenFunction.h
parent4d0ac88428b3ed7c6f3a2f4e758ea5424ecd70ae (diff)
In the common case where we are shuffling a vector, emit an
llvm vector shuffle instead of a bunch of insert/extract operations. For: vec4 = vec4.yyyy; // splat Emit: %tmp1 = shufflevector <4 x float> %tmp, <4 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > instead of: %tmp1 = extractelement <4 x float> %tmp, i32 1 %tmp2 = insertelement <4 x float> undef, float %tmp1, i32 0 %tmp3 = extractelement <4 x float> %tmp, i32 1 %tmp4 = insertelement <4 x float> %tmp2, float %tmp3, i32 1 %tmp5 = extractelement <4 x float> %tmp, i32 1 %tmp6 = insertelement <4 x float> %tmp4, float %tmp5, i32 2 %tmp7 = extractelement <4 x float> %tmp, i32 1 %tmp8 = insertelement <4 x float> %tmp6, float %tmp7, i32 3 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions