projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a46221
)
Fix SingleSource/Regression/C/2005-05-06-LongLongSignedShift.c, we were not
author
Chris Lattner
<sabre@nondot.org>
Wed, 6 Apr 2005 20:59:35 +0000
(20:59 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 6 Apr 2005 20:59:35 +0000
(20:59 +0000)
properly sign extending the top of the result of a 64-bit shift right by
a constant > 32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21120
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/X86ISelSimple.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/X86ISelSimple.cpp
b/lib/Target/X86/X86ISelSimple.cpp
index b39396854dd9d40ed7cafd1c679ec1f373cb5562..48546aa54f0083e8f15312f3defd243b00d44f10 100644
(file)
--- a/
lib/Target/X86/X86ISelSimple.cpp
+++ b/
lib/Target/X86/X86ISelSimple.cpp
@@
-3074,7
+3074,11
@@
void X86ISel::emitShiftOperation(MachineBasicBlock *MBB,
} else {
BuildMI(*MBB, IP, isSigned ? X86::SAR32ri : X86::SHR32ri, 2,
DestReg).addReg(SrcReg+1).addImm(Amount);
- BuildMI(*MBB, IP, X86::MOV32ri, 1, DestReg+1).addImm(0);
+ if (isSigned)
+ BuildMI(*MBB, IP, X86::SAR32ri, 2,
+ DestReg+1).addReg(SrcReg+1).addImm(31);
+ else
+ BuildMI(*MBB, IP, X86::MOV32ri, 1, DestReg+1).addImm(0);
}
}
} else {