Skip to content

Commit 3fb0e20

Browse files
author
Brian Gaeke
committed
Fix bug in zero-extending of shorts.
llvm-svn: 12453
1 parent ae22ce5 commit 3fb0e20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/SparcV8/InstSelectSimple.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ void V8ISel::visitBinaryOperator (BinaryOperator &I) {
289289
BuildMI (BB, V8::SRAri, 2, DestReg).addReg (TmpReg).addZImm (16);
290290
} else { // add ushort
291291
unsigned TmpReg = makeAnotherReg (I.getType ());
292-
BuildMI (BB, V8::SLLri, 2, TmpReg).addReg (ResultReg).addZImm (24);
293-
BuildMI (BB, V8::SRLri, 2, DestReg).addReg (TmpReg).addZImm (24);
292+
BuildMI (BB, V8::SLLri, 2, TmpReg).addReg (ResultReg).addZImm (16);
293+
BuildMI (BB, V8::SRLri, 2, DestReg).addReg (TmpReg).addZImm (16);
294294
}
295295
break;
296296
case cInt:

0 commit comments

Comments
 (0)