Add t2TEQrr to the map of instructions with can be reduced down into a T1 instruction. This is a special case because TEQ just sets the CPSR and doesn't write to a GPR, which is not the case for EOR. So, we need to ensure that the EOR can write to the first operand.
Details
Diff Detail
Event Timeline
@SjoerdMeijer good point.... and it actually does and somehow i just haven't updated the test correctly.
@dmgreen yes, good idea.
The mir test isn't producing the IT block, and I'm unsure why and how to get this to work. That's why I've only included the first test which is to check the IT block.
Thanks, looks okay to me. Perhaps wait a day with committing to give people one more chance to comment.
The mir test isn't producing the IT block, and I'm unsure why and how to get this to work
Run your IR testcase with "llc -stop-before=unpack-mi-bundles"; that should give you MIR in the form the second run of Thumb2SizeReduction will see it.
lib/Target/ARM/Thumb2SizeReduction.cpp | ||
---|---|---|
924 | Maybe also setIsDead(true)? Probably doesn't make much difference this late, but probably better to be consistent. |
Maybe also setIsDead(true)? Probably doesn't make much difference this late, but probably better to be consistent.