This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Refactor TargetLowering::expandMUL (NFC)
ClosedPublic

Authored by nhaehnle on Nov 23 2016, 1:09 PM.

Event Timeline

nhaehnle updated this revision to Diff 79141.Nov 23 2016, 1:09 PM
nhaehnle retitled this revision from to [SelectionDAG] Refactor TargetLowering::expandMUL (NFC).
nhaehnle updated this object.
nhaehnle added reviewers: efriedma, RKSimon.
nhaehnle added a subscriber: llvm-commits.
efriedma edited edge metadata.Nov 23 2016, 1:20 PM

This is much easier to understand; thanks.

lib/CodeGen/SelectionDAG/TargetLowering.cpp
3110

Did you mean "(Signed && HasSMUL_LOHI) || (!Signed && HasUMUL_LOHI)"?

nhaehnle added inline comments.Nov 23 2016, 1:42 PM
lib/CodeGen/SelectionDAG/TargetLowering.cpp
3110

Absolutely, thanks. Same in the if-statement below. The lit tests didn't pick this up, but I guess there aren't too many targets that have one but not the other.

nhaehnle updated this revision to Diff 79145.Nov 23 2016, 1:45 PM
nhaehnle edited edge metadata.

Fix thinko switching signed/unsigned Has[US]MUL_LOHI and HasMULH[US] check
in MakeMUL_LOHI.

RKSimon added inline comments.Nov 25 2016, 10:47 AM
lib/CodeGen/SelectionDAG/TargetLowering.cpp
3145

Is it a good idea to have variables named DL and dl? I realise that they are different types but still...

nhaehnle updated this revision to Diff 79397.Nov 28 2016, 6:27 AM

Get rid of DL to avoid possible confusion with dl.

efriedma accepted this revision.Nov 28 2016, 1:39 PM
efriedma edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Nov 28 2016, 1:39 PM
This revision was automatically updated to reflect the committed changes.