blob: 8e6b1d6e2ed78a5333d6dd684ace59f8e9c1252a [file] [log] [blame]
Reid Spencerc58ef012007-04-15 21:17:45 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep {or }
Chris Lattnera4d9dc72005-09-09 17:48:57 +00003
4; Make sure there is no register-register copies here.
5
6void %test1(int *%A, int *%B, int *%D, int* %E) {
7 %A = load int* %A
8 %B = load int* %B
9 %X = and int %A, 15
10 %Y = and int %B, -16
11 %Z = or int %X, %Y
12 store int %Z, int* %D
13 store int %A, int* %E
14 ret void
15}
16
17void %test2(int *%A, int *%B, int *%D, int* %E) {
18 %A = load int* %A
19 %B = load int* %B
20 %X = and int %A, 15
21 %Y = and int %B, -16
22 %Z = or int %X, %Y
23 store int %Z, int* %D
24 store int %B, int* %E
25 ret void
26}