diff options
| author | John McCall <rjmccall@apple.com> | 2010-04-06 23:35:53 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-04-06 23:35:53 +0000 |
| commit | 796583eec09945a028353f0a0ae669b9f622c5cc (patch) | |
| tree | 559f73e7af3fda0252669369610e82b47751473c /llvm/lib/Target | |
| parent | b36c70913b827d9c4648996f9a46c43236ef6fdd (diff) | |
| download | bcm5719-llvm-796583eec09945a028353f0a0ae669b9f622c5cc.tar.gz bcm5719-llvm-796583eec09945a028353f0a0ae669b9f622c5cc.zip | |
Fix a number of clang -Wsign-compare warnings that didn't have an obvious
solution. The only reason these don't fire with gcc-4.2 is that gcc turns off
part of -Wsign-compare in C++ on accident.
llvm-svn: 100581
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/SSEDomainFix.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp index 302c418d1ec..5e325c08c36 100644 --- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp +++ b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp @@ -200,7 +200,7 @@ void emitSPUpdate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, uint64_t ThisVal = (Offset > Chunk) ? Chunk : Offset; MachineInstr *MI = BuildMI(MBB, MBBI, DL, TII.get(Opc), SystemZ::R15D) - .addReg(SystemZ::R15D).addImm((isSub ? -(int64_t)ThisVal : ThisVal)); + .addReg(SystemZ::R15D).addImm(isSub ? -ThisVal : ThisVal); // The PSW implicit def is dead. MI->getOperand(3).setIsDead(); Offset -= ThisVal; diff --git a/llvm/lib/Target/X86/SSEDomainFix.cpp b/llvm/lib/Target/X86/SSEDomainFix.cpp index b5892602fb4..d78c70360b4 100644 --- a/llvm/lib/Target/X86/SSEDomainFix.cpp +++ b/llvm/lib/Target/X86/SSEDomainFix.cpp @@ -159,7 +159,7 @@ int SSEDomainFixPass::RegIndex(unsigned reg) { // We just need them to be consecutive, ordering doesn't matter. assert(X86::XMM9 == X86::XMM0+NumRegs-1 && "Unexpected sort"); reg -= X86::XMM0; - return reg < NumRegs ? reg : -1; + return reg < NumRegs ? (int) reg : -1; } DomainValue *SSEDomainFixPass::Alloc(int domain) { diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index 7849b51accc..e19f96987e4 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -305,7 +305,7 @@ bool X86FastISel::X86FastEmitStore(EVT VT, Value *Val, if (Opc) { addFullAddress(BuildMI(MBB, DL, TII.get(Opc)), AM) - .addImm(Signed ? CI->getSExtValue() : + .addImm(Signed ? (uint64_t) CI->getSExtValue() : CI->getZExtValue()); return true; } |

