User Details
- User Since
- Sep 12 2013, 6:55 AM (489 w, 1 d)
Aug 3 2020
Apr 21 2017
Ping? Tim, Renato?
Apr 20 2017
Sorry for the long delay! Test case updated to make the long adds explicit, and not depend on constant hoisting.
Apr 10 2017
Apr 7 2017
Apr 6 2017
Renato, perhaps you could take a look at this patch?
Mar 23 2017
Hi Tim,
Mar 22 2017
This needs a much better comment explaining why this is necessary
Added a comment explaining why this is necessary
Mar 21 2017
Shouldn't we commit this now to fix ScheduleDAGRRList, and if/when similar problems are discovered with other schedulers that are used for ARM targets, to fix them then?
Mar 18 2017
It's a def of CPSR if the S bit is set, otherwise it's a use of %noreg, or something like that, I think.
Mar 17 2017
One, it prevents schedules which are perfectly legal for non-Thumb1 code.
No, it doesn't: for the test case that I'm adding, the Thumb2 output remains a sequence of (adds, eor, eor, adc).
This is because the code I'm adding checks not only the presence but also the actual value of the OptionalDef operand, and its value is %noreg when the instruction doesn't set CPSR.
Eli, do you mean that OptionalDefs should never be used because the scheduler (and perhaps other places) ignore them?
Mar 14 2017
Mar 13 2017
Can you make sure this works with inline asm? We had a trick in the to make it work (Linux stuff)
Mar 10 2017
Updated to match the final revision of D30400
Mar 9 2017
The minor tweaks
Lowering the negative-immediate operand as a DAGCombine instead
Adding tADCS/tSBCS pseudo-instructions does indeed let
simplify the custom selection code quite a bit, but
doesn't get rid of it entirely, as the negative-immediate
operand still needs a "recursive lowering" which cannot
be specified with ISel patterns. (This is similar to how
ISD::AND needs the custom lowering into a tBIC.)
Mar 8 2017
When compiling for softfp targets, this new warning doesn't make sense: there are no VFP registers to save.
Jonathan, would you please conditionalize it to only affect hardfp targets?
Mar 7 2017
Hybrid implementation
Mar 6 2017
Updated test/CodeGen/ARM/smml.ll to check the handling of live CPSR (and cleaned up the CHECKs in general)
Mar 3 2017
Copying the trick that the lowering for ISD::AND uses to create and lower a constant node
Select(RHS.getNode()) must be deferred until RHS has users; otherwise, if Select() converts RHS into a duplicate of an existing node, then the DAG automatically updates all uses of RHS to use the existing node instead, and deletes the RHS's own node.
If we call Select(RHS.getNode()) when RHS doesn't yet have any users, then nothing gets updated, RHS's node gets deleted, and we end up adding uses to a deleted node. Boom!
Mar 2 2017
Added tests for SUBC with immediate
t2ADC should be predicable?
I'd think so too! As you see, long addition/subtraction is not the neatest part of the ARM backend :-)
Why not? "t2ADDSrr" is a pseudo-instruction, not an actual encoding.
Mar 1 2017
Deleting the comment which is no longer relevant
Patch updated
clobbering CPSR when we don't need to is the least of the problems; what we have in ARM and Thumb2 is that ADD and ADDS are defined separately, the former producing one result (to match an ADD node), and the latter producing two (to match an ADDC node). In Thumb1, we cannot define them separately, so tADD MIs are defined with an OptionalDef for CPSR. The ISel patterns won't let me match an MI with one result value (and an OptionalDef) to an ISD node producing two results. Redefining tADD to always produce two results doesn't work either, because it's assumed, by many layers including AsmParser / AsmPrinter, to still have the OptionalDef for CPSR; and the InstrEmitter won't let me have CPSR as both an OptionalDef and an actual result in the same MI.
Handwave handwave, I cannot really prove that it cannot be done, but I mean I had tried, and I couldn't.
Feb 28 2017
Are you sure we can't use the same codepath we currently use for Thumb2/ARM here?
Added LLVM_FALLTHROUGH
Patch updated
Thanks Eli!
Indeed the assertion was wrong; this also shows how insufficient our tests for long adds/subracts were.
Updating the patch to address both these points.
Feb 27 2017
Feb 17 2017
Mar 23 2016
Mar 21 2016
Ping again
Mar 8 2016
Mar 4 2016
Feb 25 2016
Feb 23 2016
Feb 10 2016
Feb 2 2016
Thank you Eric for your detailed comments!
Jan 21 2016
Jan 14 2016
Ping?
Jan 5 2016
Thank you Michael and Eric for your comments!
I've now committed the non-controversial changes as r256823.
Jan 4 2016
Happy New Year everyone!
Dec 24 2015
Ana, thank you for these new test cases.
Dec 23 2015
Updating the patch to simplify ARMLoadStoreOpt::CombineMovBx
Dec 22 2015
Updating the patch to handle the aforementioned additional cases of pop {lr} in test/CodeGen/Thumb/thumb-shrink-wrapping.ll
test/CodeGen/Thumb/thumb-shrink-wrapping.ll includes a few more cases when pop {lr} can still be generated; all of them are wrong, and need addressing.
It's followed by an unconditional branch to a tBX_RET, and my patch only handled falling-through to a tBX_RET :-/
Dec 9 2015
Dec 8 2015
Good point that if SDIVREM8_SEXT_HREG needs not be generated for an i64 result, then UDIVREM8_ZEXT_HREG doesn't need this either.
Ping?
Dec 7 2015
Dec 4 2015
Dec 2 2015
Ping again
Dec 1 2015
Quentin, thank you for the helpful suggestions!
Nov 27 2015
Thanks for the review!
Nov 26 2015
This ^ does not look correct for v4t, which doesn't support changing the thumb
bit via a pop into pc.
Nov 25 2015
Would you mind leaving a FIXME in emitPopSpecialFixUp
The two changes this patch depended on were both committed last week, so hopefully we can now proceed with this one, too.
Updated as discussed