summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-10 06:38:32 +0000
committerChris Lattner <sabre@nondot.org>2006-05-10 06:38:32 +0000
commitb25cb79604e359c262ce1820c339bd90337c236e (patch)
tree3cd16318af4fbf2926d8ee12f157ca1e4910c49f /llvm
parent9665ba053f54e7d1b1422b41d9a8725508887a30 (diff)
downloadbcm5719-llvm-b25cb79604e359c262ce1820c339bd90337c236e.tar.gz
bcm5719-llvm-b25cb79604e359c262ce1820c339bd90337c236e.zip
Fix the PowerPC JIT-only failure on UnitTests/Vector/sumarray-dbl, which is
really a bad codegen bug that LLC happens to get lucky with. I must chat with Nate for the proper fix. llvm-svn: 28213
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
index 36cb869abda..0b961cb8074 100644
--- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -506,11 +506,11 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
// If there is a preferred stack alignment, align R1 now
if (MaxAlign > TargetAlign) {
assert(isPowerOf2_32(MaxAlign) && MaxAlign < 32767 && "Invalid alignment!");
- assert(isInt16(MaxAlign-NumBytes) && "Unhandled stack size and alignment!");
+ assert(isInt16(0-NumBytes) && "Unhandled stack size and alignment!");
BuildMI(MBB, MBBI, PPC::RLWINM, 4, PPC::R0)
.addReg(PPC::R1).addImm(0).addImm(32-Log2_32(MaxAlign)).addImm(31);
BuildMI(MBB, MBBI, PPC::SUBFIC,2,PPC::R0).addReg(PPC::R0)
- .addImm(MaxAlign-NumBytes);
+ .addImm(0-NumBytes);
BuildMI(MBB, MBBI, PPC::STWUX, 3)
.addReg(PPC::R1).addReg(PPC::R1).addReg(PPC::R0);
} else if (NumBytes <= 32768) {
OpenPOWER on IntegriCloud