llvm.org GIT mirror llvm / bc91546
These tests all rely on using register mnemonics and thus must behave in the world of darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32725 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Laskey 13 years ago
8 changed file(s) with 69 addition(s) and 69 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'vspltish v.*, 10'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | grep 'vspltish v.*, 10'
11
22 void %test(<8 x short>* %P) {
33 %tmp = load <8 x short>* %P ; <<8 x short>> [#uses=1]
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'rlwinm r0, r1, 0, 22, 31' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'subfic r0, r0, -17408' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'rldicl r0, r1, 0, 54'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'rlwinm r0, r1, 0, 22, 31' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'subfic r0, r0, -17408' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'rldicl r0, r1, 0, 54'
33
44
55 implementation
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwu r1, -64(r1)' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -64(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdu r1, -112(r1)' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -112(r1)' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'stwu r1, -64(r1)' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'lwz r1, 0(r1)' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stwu r1, -64(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'stdu r1, -112(r1)' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'ld r1, 0(r1)' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stdu r1, -112(r1)' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'ld r31, 40(r1)'
1616
1717
1818 implementation
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lis r0, -1' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'ori r0, r0, 32704' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwux r1, r1, r0' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lis r0, -1' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'ori r0, r0, 32704' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwux r1, r1, r0' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'lis r0, -1' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ori r0, r0, 32656' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdux r1, r1, r0' &&
16 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
17 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
18 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
19 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'lis r0, -1' &&
20 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ori r0, r0, 32656' &&
21 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdux r1, r1, r0' &&
22 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
23 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'lis r0, -1' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'ori r0, r0, 32704' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'stwux r1, r1, r0' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'lwz r1, 0(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | not grep 'lwz r31, 20(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'lis r0, -1' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'ori r0, r0, 32704' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stwux r1, r1, r0' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | not grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'lis r0, -1' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'ori r0, r0, 32656' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'stdux r1, r1, r0' &&
16 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'ld r1, 0(r1)' &&
17 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | not grep 'ld r31, 40(r1)' &&
18 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'std r31, 40(r1)' &&
19 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'lis r0, -1' &&
20 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'ori r0, r0, 32656' &&
21 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stdux r1, r1, r0' &&
22 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
23 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'ld r31, 40(r1)'
2424
2525
2626 implementation
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwu r1, -16448(r1)' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'addi r1, r1, 16448' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -16448(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'addi r1, r1, 16448' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdu r1, -16496(r1)' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'addi r1, r1, 16496' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -16496(r1)' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'addi r1, r1, 16496' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'stwu r1, -16448(r1)' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'addi r1, r1, 16448' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | not grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stwu r1, -16448(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'addi r1, r1, 16448' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | not grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'stdu r1, -16496(r1)' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | grep 'addi r1, r1, 16496' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 | not grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'stdu r1, -16496(r1)' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'addi r1, r1, 16496' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | grep 'ld r31, 40(r1)'
1616
1717
1818 implementation
0 ; fsqrt should be generated when the fsqrt feature is enabled, but not
11 ; otherwise.
22
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=+fsqrt | grep 'fsqrt f1, f1' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'fsqrt f1, f1' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-fsqrt | not grep 'fsqrt f1, f1' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g4 | not grep 'fsqrt f1, f1'
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | grep 'fsqrt f1, f1' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | grep 'fsqrt f1, f1' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | not grep 'fsqrt f1, f1' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | not grep 'fsqrt f1, f1'
77
88 declare double %llvm.sqrt.f64(double)
99 double %X(double %Y) {
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'srwi r., r., 5'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep 'srwi r., r., 5'
11
22 int %eq0(int %a) {
33 %tmp.1 = seteq int %a, 0 ; [#uses=1]
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=stfiwx | grep stfiwx &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=stfiwx | not grep r1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-stfiwx | not grep stfiwx &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-stfiwx | grep r1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | grep stfiwx &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx | not grep r1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | not grep stfiwx &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx | grep r1
44
55 void %test(float %a, int* %b) {
66 %tmp.2 = cast float %a to int