2008-03-01 17:15:35 +08:00
|
|
|
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
|
2007-04-15 04:13:02 +08:00
|
|
|
; RUN: grep {add float}
|
2006-03-05 08:21:28 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
%V = type <4 x float>
|
2006-03-05 08:21:28 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define float @test(%V %A, %V %B, float %f) {
|
|
|
|
%C = insertelement %V %A, float %f, i32 0 ; <%V> [#uses=1]
|
|
|
|
%D = add %V %C, %B ; <%V> [#uses=1]
|
|
|
|
%E = extractelement %V %D, i32 0 ; <float> [#uses=1]
|
2006-03-05 08:21:28 +08:00
|
|
|
ret float %E
|
|
|
|
}
|
|
|
|
|