blob: 4b2b07f33504c736d4ad5cebb2b94c9b2b1ea73a [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +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}