[llvm-commits] [llvm] r51696 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/memmove-4.ll
Dan Gohman
gohman at apple.com
Fri May 30 18:46:55 PDT 2008
On May 29, 2008, at 6:49 PM, Chris Lattner wrote:
>>
>> + std::string Str;
>
> Str is dead.
Done.
>
>
>>
>> + uint64_t SrcOff = 0, DstOff = 0;
>> +
>> + SmallVector<SDOperand, 8> LoadValues;
>> + SmallVector<SDOperand, 8> LoadChains;
>> + SmallVector<SDOperand, 8> OutChains;
>> + unsigned NumMemOps = MemOps.size();
>> + for (unsigned i = 0; i < NumMemOps; i++) {
>> + MVT::ValueType VT = MemOps[i];
>> + unsigned VTSize = MVT::getSizeInBits(VT) / 8;
>> + SDOperand Value, Store;
>> +
>> + Value = DAG.getLoad(VT, Chain,
>> + getMemBasePlusOffset(Src, SrcOff, DAG),
>> + SrcSV, SrcSVOff + SrcOff, false, Align);
>> + LoadValues.push_back(Value);
>> + LoadChains.push_back(Value.getValue(1));
>> + SrcOff += VTSize;
>> + }
>
> NumMemOps can never be zero here, right? How about an assert?
What about a memmove of size 0? It's true that we have multiple
optimizations that will zap such a thing, but we don't want llc
to abort if those optimizations aren't run.
Dan
More information about the llvm-commits
mailing list