[llvm-commits] [llvm] r138706 - in /llvm/trunk/lib/Target: ARM/ARMISelLowering.cpp X86/X86ISelLowering.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Aug 27 10:36:14 PDT 2011
Author: d0k
Date: Sat Aug 27 12:36:14 2011
New Revision: 138706
URL: http://llvm.org/viewvc/llvm-project?rev=138706&view=rev
Log:
Silence GCC warnings and make an array const.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=138706&r1=138705&r2=138706&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Sat Aug 27 12:36:14 2011
@@ -5216,7 +5216,7 @@
unsigned MachineOpc;
};
-static AddSubFlagsOpcodePair AddSubFlagsOpcodeMap[] = {
+static const AddSubFlagsOpcodePair AddSubFlagsOpcodeMap[] = {
{ARM::ADCSri, ARM::ADCri},
{ARM::ADCSrr, ARM::ADCrr},
{ARM::ADCSrsi, ARM::ADCrsi},
@@ -5256,7 +5256,7 @@
// the tiny opcode table is not costly.
static const int NPairs =
sizeof(AddSubFlagsOpcodeMap) / sizeof(AddSubFlagsOpcodePair);
- for (AddSubFlagsOpcodePair *Pair = &AddSubFlagsOpcodeMap[0],
+ for (const AddSubFlagsOpcodePair *Pair = &AddSubFlagsOpcodeMap[0],
*End = &AddSubFlagsOpcodeMap[NPairs]; Pair != End; ++Pair) {
if (OldOpc == Pair->PseudoOpc) {
NewOpc = Pair->MachineOpc;
@@ -5303,7 +5303,7 @@
Offset = -Offset;
MachineMemOperand *MMO = *MI->memoperands_begin();
- MachineInstrBuilder MIB = BuildMI(*BB, MI, dl, TII->get(NewOpc))
+ BuildMI(*BB, MI, dl, TII->get(NewOpc))
.addOperand(MI->getOperand(0)) // Rn_wb
.addOperand(MI->getOperand(1)) // Rt
.addOperand(MI->getOperand(2)) // Rn
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=138706&r1=138705&r2=138706&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Aug 27 12:36:14 2011
@@ -10345,9 +10345,8 @@
// FIXME: On 32-bit, load -> fild or movq would be more efficient
// (The only way to get a 16-byte load is cmpxchg16b)
// FIXME: 16-byte ATOMIC_CMP_SWAP isn't actually hooked up at the moment.
- SDValue Zero = DAG.getConstant(0, cast<AtomicSDNode>(Node)->getMemoryVT());
- SDValue Swap = DAG.getAtomic(ISD::ATOMIC_CMP_SWAP, dl,
- cast<AtomicSDNode>(Node)->getMemoryVT(),
+ SDValue Zero = DAG.getConstant(0, VT);
+ SDValue Swap = DAG.getAtomic(ISD::ATOMIC_CMP_SWAP, dl, VT,
Node->getOperand(0),
Node->getOperand(1), Zero, Zero,
cast<AtomicSDNode>(Node)->getMemOperand(),
@@ -10425,7 +10424,7 @@
}
case ISD::ATOMIC_CMP_SWAP: {
EVT T = N->getValueType(0);
- assert (T == MVT::i64 || T == MVT::i128 && "can only expand cmpxchg pair");
+ assert((T == MVT::i64 || T == MVT::i128) && "can only expand cmpxchg pair");
bool Regs64bit = T == MVT::i128;
EVT HalfT = Regs64bit ? MVT::i64 : MVT::i32;
SDValue cpInL, cpInH;
More information about the llvm-commits
mailing list