2006-12-02 04:23:10 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
|
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwin
|
2005-10-10 21:21:36 +00:00
|
|
|
|
|
|
|
void %test(ubyte* %P) {
|
|
|
|
%W = load ubyte* %P
|
|
|
|
%X = shl ubyte %W, ubyte 1
|
|
|
|
%Y = add ubyte %X, 2
|
|
|
|
%Z = and ubyte %Y, 254 ; dead and
|
|
|
|
store ubyte %Z, ubyte* %P
|
|
|
|
ret void
|
|
|
|
}
|
2006-02-27 00:20:23 +00:00
|
|
|
|
2006-12-31 06:02:00 +00:00
|
|
|
ushort @zext %test2(ushort @zext %crc) {
|
|
|
|
; No and's should be needed for the ushorts here.
|
2006-02-27 00:20:23 +00:00
|
|
|
%tmp.1 = shr ushort %crc, ubyte 1
|
|
|
|
%tmp.7 = xor ushort %tmp.1, 40961
|
|
|
|
ret ushort %tmp.7
|
|
|
|
}
|
|
|
|
|