2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -instcombine -S | \
|
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]
|
2009-06-05 06:49:04 +08:00
|
|
|
%D = fadd %V %C, %B ; <%V> [#uses=1]
|
2008-03-01 17:15:35 +08:00
|
|
|
%E = extractelement %V %D, i32 0 ; <float> [#uses=1]
|
2006-03-05 08:21:28 +08:00
|
|
|
ret float %E
|
|
|
|
}
|
|
|
|
|