diff options
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/PowerPC/retaddr.ll | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index c574f7004a..150bda7e24 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -817,7 +817,7 @@ void PPCRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, // clear can be encoded. This is extremely uncommon, because normally you // only "std" to a stack slot that is at least 4-byte aligned, but it can // happen in invalid code. - if (isInt16(Offset) && (!isIXAddr || (isIXAddr & 3) == 0)) { + if (isInt16(Offset) && (!isIXAddr || (Offset & 3) == 0)) { if (isIXAddr) Offset >>= 2; // The actual encoded value has the low two bits zero. MI.getOperand(OffsetOperandNo).ChangeToImmediate(Offset); diff --git a/test/CodeGen/PowerPC/retaddr.ll b/test/CodeGen/PowerPC/retaddr.ll index 6b9a5e3f06..f4cad34add 100644 --- a/test/CodeGen/PowerPC/retaddr.ll +++ b/test/CodeGen/PowerPC/retaddr.ll @@ -1,5 +1,6 @@ ; RUN: llvm-as < %s | llc -march=ppc32 | grep mflr ; RUN: llvm-as < %s | llc -march=ppc32 | grep lwz +; RUN: llvm-as < %s | llc -march=ppc64 | grep {ld r., 16(r1)} target triple = "powerpc-apple-darwin8" |