[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-05-01-SchedCausingSpills.ll 2006-05-02-InstrSched1.ll 2006-05-02-InstrSched2.ll

Evan Cheng evan.cheng at apple.com
Tue May 2 19:11:48 PDT 2006



Changes in directory llvm/test/Regression/CodeGen/X86:

2006-05-01-SchedCausingSpills.ll added (r1.1)
2006-05-02-InstrSched1.ll added (r1.1)
2006-05-02-InstrSched2.ll added (r1.1)
---
Log message:

A few instruction scheduling test cases.


---
Diffs of the changes:  (+117 -0)

 2006-05-01-SchedCausingSpills.ll |   73 +++++++++++++++++++++++++++++++++++++++
 2006-05-02-InstrSched1.ll        |   20 ++++++++++
 2006-05-02-InstrSched2.ll        |   24 ++++++++++++
 3 files changed, 117 insertions(+)


Index: llvm/test/Regression/CodeGen/X86/2006-05-01-SchedCausingSpills.ll
diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-05-01-SchedCausingSpills.ll:1.1
*** /dev/null	Tue May  2 21:11:46 2006
--- llvm/test/Regression/CodeGen/X86/2006-05-01-SchedCausingSpills.ll	Tue May  2 21:11:36 2006
***************
*** 0 ****
--- 1,73 ----
+ ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -stats 2>&1 | not grep 'Number of register spills'
+ 
+ int %foo(<4 x float>* %a, <4 x float>* %b, <4 x float>* %c, <4 x float>* %d) {
+ 	%tmp44 = load <4 x float>* %a		; <<4 x float>> [#uses=9]
+ 	%tmp46 = load <4 x float>* %b		; <<4 x float>> [#uses=1]
+ 	%tmp48 = load <4 x float>* %c		; <<4 x float>> [#uses=1]
+ 	%tmp50 = load <4 x float>* %d		; <<4 x float>> [#uses=1]
+ 	%tmp51 = cast <4 x float> %tmp44 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp = shufflevector <4 x int> %tmp51, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 >		; <<4 x int>> [#uses=2]
+ 	%tmp52 = cast <4 x int> %tmp to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp60 = xor <4 x int> %tmp, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 >		; <<4 x int>> [#uses=1]
+ 	%tmp61 = cast <4 x int> %tmp60 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp74 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp52, <4 x float> %tmp44, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp75 = cast <4 x float> %tmp74 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp88 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp61, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp89 = cast <4 x float> %tmp88 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp98 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp75, <4 x int> %tmp89 )		; <<4 x int>> [#uses=1]
+ 	%tmp102 = cast <4 x int> %tmp98 to <8 x short>		; <<8 x short>> [#uses=1]
+ 	%tmp = shufflevector <8 x short> %tmp102, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp105 = shufflevector <8 x short> %tmp, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp105 = cast <8 x short> %tmp105 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	store <4 x float> %tmp105, <4 x float>* %a
+ 	%tmp108 = cast <4 x float> %tmp46 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp109 = shufflevector <4 x int> %tmp108, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 >		; <<4 x int>> [#uses=2]
+ 	%tmp109 = cast <4 x int> %tmp109 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp119 = xor <4 x int> %tmp109, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 >		; <<4 x int>> [#uses=1]
+ 	%tmp120 = cast <4 x int> %tmp119 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp133 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp109, <4 x float> %tmp44, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp134 = cast <4 x float> %tmp133 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp147 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp120, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp148 = cast <4 x float> %tmp147 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp159 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp134, <4 x int> %tmp148 )		; <<4 x int>> [#uses=1]
+ 	%tmp163 = cast <4 x int> %tmp159 to <8 x short>		; <<8 x short>> [#uses=1]
+ 	%tmp164 = shufflevector <8 x short> %tmp163, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp166 = shufflevector <8 x short> %tmp164, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp166 = cast <8 x short> %tmp166 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	store <4 x float> %tmp166, <4 x float>* %b
+ 	%tmp169 = cast <4 x float> %tmp48 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp170 = shufflevector <4 x int> %tmp169, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 >		; <<4 x int>> [#uses=2]
+ 	%tmp170 = cast <4 x int> %tmp170 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp180 = xor <4 x int> %tmp170, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 >		; <<4 x int>> [#uses=1]
+ 	%tmp181 = cast <4 x int> %tmp180 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp194 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp170, <4 x float> %tmp44, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp195 = cast <4 x float> %tmp194 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp208 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp181, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp209 = cast <4 x float> %tmp208 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp220 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp195, <4 x int> %tmp209 )		; <<4 x int>> [#uses=1]
+ 	%tmp224 = cast <4 x int> %tmp220 to <8 x short>		; <<8 x short>> [#uses=1]
+ 	%tmp225 = shufflevector <8 x short> %tmp224, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp227 = shufflevector <8 x short> %tmp225, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp227 = cast <8 x short> %tmp227 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	store <4 x float> %tmp227, <4 x float>* %c
+ 	%tmp230 = cast <4 x float> %tmp50 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp231 = shufflevector <4 x int> %tmp230, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 >		; <<4 x int>> [#uses=2]
+ 	%tmp231 = cast <4 x int> %tmp231 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp241 = xor <4 x int> %tmp231, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 >		; <<4 x int>> [#uses=1]
+ 	%tmp242 = cast <4 x int> %tmp241 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	%tmp255 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp231, <4 x float> %tmp44, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp256 = cast <4 x float> %tmp255 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp269 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp242, sbyte 1 )		; <<4 x float>> [#uses=1]
+ 	%tmp270 = cast <4 x float> %tmp269 to <4 x int>		; <<4 x int>> [#uses=1]
+ 	%tmp281 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp256, <4 x int> %tmp270 )		; <<4 x int>> [#uses=1]
+ 	%tmp285 = cast <4 x int> %tmp281 to <8 x short>		; <<8 x short>> [#uses=1]
+ 	%tmp286 = shufflevector <8 x short> %tmp285, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp288 = shufflevector <8 x short> %tmp286, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 >		; <<8 x short>> [#uses=1]
+ 	%tmp288 = cast <8 x short> %tmp288 to <4 x float>		; <<4 x float>> [#uses=1]
+ 	store <4 x float> %tmp288, <4 x float>* %d
+ 	ret int 0
+ }
+ 
+ declare <4 x float> %llvm.x86.sse.cmp.ps(<4 x float>, <4 x float>, sbyte)
+ 
+ declare <4 x int> %llvm.x86.sse2.packssdw.128(<4 x int>, <4 x int>)


Index: llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll
diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll:1.1
*** /dev/null	Tue May  2 21:11:48 2006
--- llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched1.ll	Tue May  2 21:11:36 2006
***************
*** 0 ****
--- 1,20 ----
+ ; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static -stats 2>&1 | grep "asm-printer" | grep 14
+ %size20 = external global uint		; <uint*> [#uses=1]
+ %in5 = external global ubyte*		; <ubyte**> [#uses=1]
+ 
+ int %compare(sbyte* %a, sbyte* %b) {
+ 	%tmp = cast sbyte* %a to uint*		; <uint*> [#uses=1]
+ 	%tmp1 = cast sbyte* %b to uint*		; <uint*> [#uses=1]
+ 	%tmp = load uint* %size20		; <uint> [#uses=1]
+ 	%tmp = load ubyte** %in5		; <ubyte*> [#uses=2]
+ 	%tmp3 = load uint* %tmp1		; <uint> [#uses=1]
+ 	%tmp4 = getelementptr ubyte* %tmp, uint %tmp3		; <ubyte*> [#uses=1]
+ 	%tmp7 = load uint* %tmp		; <uint> [#uses=1]
+ 	%tmp8 = getelementptr ubyte* %tmp, uint %tmp7		; <ubyte*> [#uses=1]
+ 	%tmp8 = cast ubyte* %tmp8 to sbyte*		; <sbyte*> [#uses=1]
+ 	%tmp4 = cast ubyte* %tmp4 to sbyte*		; <sbyte*> [#uses=1]
+ 	%tmp = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp )		; <int> [#uses=1]
+ 	ret int %tmp
+ }
+ 
+ declare int %memcmp(sbyte*, sbyte*, uint)


Index: llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched2.ll
diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched2.ll:1.1
*** /dev/null	Tue May  2 21:11:48 2006
--- llvm/test/Regression/CodeGen/X86/2006-05-02-InstrSched2.ll	Tue May  2 21:11:36 2006
***************
*** 0 ****
--- 1,24 ----
+ ; RUN: llvm-as < %s | llc -march=x86 -stats 2>&1 | grep "asm-printer" | grep 19
+ 
+ void %_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(sbyte* %tmp435.i, uint* %tmp449.i.out) {
+ newFuncRoot:
+ 	br label %cond_true456.i
+ 
+ bb459.i.exitStub:		; preds = %cond_true456.i
+ 	store uint %tmp449.i, uint* %tmp449.i.out
+ 	ret void
+ 
+ cond_true456.i:		; preds = %cond_true456.i, %newFuncRoot
+ 	%__s441.2.4.i = phi sbyte* [ %tmp451.i, %cond_true456.i ], [ %tmp435.i, %newFuncRoot ]		; <sbyte*> [#uses=2]
+ 	%__h.2.4.i = phi uint [ %tmp449.i, %cond_true456.i ], [ 0, %newFuncRoot ]		; <uint> [#uses=1]
+ 	%tmp446.i = mul uint %__h.2.4.i, 5		; <uint> [#uses=1]
+ 	%tmp.i = load sbyte* %__s441.2.4.i		; <sbyte> [#uses=1]
+ 	%tmp448.i = cast sbyte %tmp.i to uint		; <uint> [#uses=1]
+ 	%tmp449.i = add uint %tmp448.i, %tmp446.i		; <uint> [#uses=2]
+ 	%tmp450.i = cast sbyte* %__s441.2.4.i to uint		; <uint> [#uses=1]
+ 	%tmp451.i = add uint %tmp450.i, 1		; <uint> [#uses=1]
+ 	%tmp451.i = cast uint %tmp451.i to sbyte*		; <sbyte*> [#uses=2]
+ 	%tmp45435.i = load sbyte* %tmp451.i		; <sbyte> [#uses=1]
+ 	%tmp45536.i = seteq sbyte %tmp45435.i, 0		; <bool> [#uses=1]
+ 	br bool %tmp45536.i, label %bb459.i.exitStub, label %cond_true456.i
+ }






More information about the llvm-commits mailing list