[llvm-commits] [llvm] r144123 - in /llvm/trunk: lib/Target/ARM/ARMLoadStoreOptimizer.cpp test/CodeGen/ARM/ldrd.ll

Chris Lattner clattner at apple.com
Tue Nov 8 14:32:03 PST 2011


On Nov 8, 2011, at 2:15 PM, Evan Cheng wrote:

>>>    unsigned EvenRegNum = TRI->getDwarfRegNum(EvenReg, false);
>>>    unsigned OddRegNum  = TRI->getDwarfRegNum(OddReg, false);
>>> -    if ((EvenRegNum & 1) == 0 && (EvenRegNum + 1) == OddRegNum)
>>> +    // ARM errata 602117: LDRD with base in list may result in incorrect base
>>> +    // register when interrupted or faulted.
>>> +    bool Errata602117 = EvenReg == BaseReg && STI->getCPUString() == "cortex-m3";
>> 
>> Err, checking getCPUString() seems like a hack; shouldn't this be a
>> subtarget feature?
> 
> That would make sense if this particular cpu has more than one subtarget features. As it is, I don't see the point. We're using a lot of subtarget bits already.

Please at least make it be a STI->isFoo() method.

-Chris



More information about the llvm-commits mailing list