blob: 694d9d590f0e52022e1c2588169a2efdbebbd916 [file] [log] [blame]
Reid Spencer6e87ec42007-04-16 17:36:08 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -gcse -instcombine | \
2; RUN: llvm-dis | not grep sub
Chris Lattner1c4ecc02006-04-14 05:09:53 +00003
4uint %test_extractelement(<4 x uint> %V) {
5 %R = extractelement <4 x uint> %V, uint 1
6 %R2 = extractelement <4 x uint> %V, uint 1
7 %V = sub uint %R, %R2
8 ret uint %V
9}
10
11<4 x uint> %test_insertelement(<4 x uint> %V) {
12 %R = insertelement <4 x uint> %V, uint 0, uint 0
13 %R2 = insertelement <4 x uint> %V, uint 0, uint 0
14 %x = sub <4 x uint> %R, %R2
15 ret <4 x uint> %x
16}
17
18<4 x uint> %test_shufflevector(<4 x uint> %V) {
19 %R = shufflevector <4 x uint> %V, <4 x uint> %V,
20 <4 x uint> < uint 1, uint undef, uint 7, uint 2>
21 %R2 = shufflevector <4 x uint> %V, <4 x uint> %V,
22 <4 x uint> < uint 1, uint undef, uint 7, uint 2>
23 %x = sub <4 x uint> %R, %R2
24 ret <4 x uint> %x
25}
26