[llvm-commits] [llvm] r140134 - in /llvm/trunk: include/llvm/MC/MCInstrDesc.h lib/CodeGen/SelectionDAG/InstrEmitter.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMInstrInfo.td lib/Target/ARM/ARMInstrThumb2.td test/CodeGen/ARM/2011-09-19-cpsr.ll utils/TableGen/CodeGenInstruction.cpp utils/TableGen/CodeGenInstruction.h utils/TableGen/InstrInfoEmitter.cpp

Andrew Trick atrick at apple.com
Tue Sep 20 09:07:18 PDT 2011


On Sep 20, 2011, at 8:49 AM, Evan Cheng wrote:

> 
> 
> On Sep 19, 2011, at 10:36 PM, Andrew Trick <atrick at apple.com> wrote:
> 
>> On Sep 19, 2011, at 9:55 PM, Evan Cheng wrote:
>> 
>>> Thanks! Just curious, could you have fixed the bug by adding hasPostIselHook = 1 to SUBS?
>>> 
>>> Evan
>>> 
>> 
>> t2SUBS was already under hasPostIselHook (T2I_bin_s_irs). Consequently, when its CPSR result was dead, the implicit def would be removed--that's wrong for any opcode that always sets the 's' bit. Hard-coding certain opcodes would be  a sufficient fix, but I wanted some form
> 
> 
> I'm missing something obvious then. If the cpsr def isn't used, why can't codegen remove the implicit def and the optional def? The net effect is to change it to the non-S variant. 

There's no non-S variant of the opcode. I'm not 100% sure why we can't convert the opcode to adds/subs.w later.
-Andy



More information about the llvm-commits mailing list