Page MenuHomePhabricator
Feed Advanced Search

Yesterday

deadalnix added a comment to D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..

IMHO this is very unusual and papers over some other problem.

Fri, Aug 16, 8:34 PM · Restricted Project

Sun, Aug 11

deadalnix updated the diff for D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..

Rebase and ping

Sun, Aug 11, 11:07 PM · Restricted Project

Sat, Jul 20

deadalnix updated the diff for D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..

Revert the addition of an unecessary empty line.

Sat, Jul 20, 7:12 PM · Restricted Project
deadalnix added inline comments to D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..
Sat, Jul 20, 6:37 PM · Restricted Project

Thu, Jul 18

deadalnix added a comment to D62392: [DAGCombine][ARM] (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry) fold.

@lebedev.ri I think these are reasonable assumptions. Just add a test case for X86 and this is good to go as far as I'm concerned.

Thu, Jul 18, 4:44 PM · Restricted Project

Jul 16 2019

deadalnix added a comment to D62392: [DAGCombine][ARM] (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry) fold.

Maybe it is worth adding some platform dependent check to actually make sure turning the carry into a scalar is expensive? Or is it a reasonable assumption to make that it expensive on all plateforms?

Jul 16 2019, 9:33 AM · Restricted Project
deadalnix updated the diff for D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..

Rebase now that D59208 landed on master.

Jul 16 2019, 8:38 AM · Restricted Project
deadalnix committed rL366214: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip….
[DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip…
Jul 16 2019, 8:20 AM
deadalnix closed D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..
Jul 16 2019, 8:19 AM · Restricted Project

Jul 11 2019

deadalnix updated the diff for D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..

tomatch => to match

Jul 11 2019, 5:47 AM · Restricted Project
deadalnix updated the diff for D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..

Remove default value for extractBooleanFlip's Force parameter.

Jul 11 2019, 5:26 AM · Restricted Project
deadalnix added inline comments to D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..
Jul 11 2019, 4:39 AM · Restricted Project
deadalnix added inline comments to D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..
Jul 11 2019, 4:36 AM · Restricted Project

Jul 3 2019

deadalnix edited parent revisions for D57317: [DAGCombine] Deduplicate addcarry node using commutativity., added: 1; removed: 1.
Jul 3 2019, 5:03 PM · Restricted Project
deadalnix removed a child revision for D33587: [DAGCombine] Do several rounds of combine.: D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jul 3 2019, 5:03 PM · Restricted Project
deadalnix added a child revision for D64174: [DAGCombine] Do several rounds of combine for addcarry nodes.: D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jul 3 2019, 5:03 PM · Restricted Project
deadalnix added a child revision for D33587: [DAGCombine] Do several rounds of combine.: D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jul 3 2019, 5:03 PM · Restricted Project
deadalnix updated the diff for D57317: [DAGCombine] Deduplicate addcarry node using commutativity..

Rebased on top of D64174 , which expose many instances of this pattern.

Jul 3 2019, 5:03 PM · Restricted Project
deadalnix created D64174: [DAGCombine] Do several rounds of combine for addcarry nodes..
Jul 3 2019, 4:58 PM · Restricted Project
deadalnix updated the diff for D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..

Add a comment explainign what extractBooleanFlip does.

Jul 3 2019, 4:10 PM · Restricted Project
deadalnix added inline comments to D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..
Jul 3 2019, 4:03 PM · Restricted Project
deadalnix added inline comments to D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..
Jul 3 2019, 2:51 PM · Restricted Project
deadalnix updated the diff for D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..

Rebase, extract the NFC changes into a NFC patch and remove redundant getNode call.

Jul 3 2019, 9:47 AM · Restricted Project
deadalnix committed rL365054: Use getAllOnesConstants instead of -1 in DAGCombiner. NFC.
Use getAllOnesConstants instead of -1 in DAGCombiner. NFC
Jul 3 2019, 9:34 AM
deadalnix committed rL365051: [DAGCombine] More diamong carry pattern optimization..
[DAGCombine] More diamong carry pattern optimization.
Jul 3 2019, 9:18 AM

Jun 26 2019

deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

rebase and ping!

Jun 26 2019, 3:34 PM · Restricted Project

Jun 12 2019

deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Update logic as requested

Jun 12 2019, 4:51 PM · Restricted Project
deadalnix added a comment to D57302: [DAGCombine] More diamond carry pattern optimization..

Do you have a test case where diamond carries are generated for subs ? I'm happy to look into this, but I have no test case.

Jun 12 2019, 4:44 PM · Restricted Project

Jun 2 2019

deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Rebase, ping?

Jun 2 2019, 9:13 AM · Restricted Project

May 17 2019

deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

This is important to be able to make the carry propagation path canonical to be able to optimise large ineteger computation further. I would really appreciate if tis could move forward as this is gating a lot of work.

May 17 2019, 4:22 AM · Restricted Project

May 4 2019

deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Rebase and ping.

May 4 2019, 4:27 AM · Restricted Project

Apr 14 2019

deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Ping

Apr 14 2019, 5:32 PM · Restricted Project

Apr 1 2019

deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Rebase and ping.

Apr 1 2019, 4:21 PM · Restricted Project

Mar 30 2019

deadalnix abandoned D58877: [InstCombine] fold add(add(A, ~B), 1) -> sub(A, B).

Ok, abandoning it as it doesn't seems to be necessary.

Mar 30 2019, 6:43 AM · Restricted Project

Mar 22 2019

deadalnix added a comment to D58877: [InstCombine] fold add(add(A, ~B), 1) -> sub(A, B).

Is someone of a different opinion than @spatel ? If not, I'll abandon this patch soon.

Mar 22 2019, 9:55 AM · Restricted Project

Mar 12 2019

deadalnix added a comment to D58877: [InstCombine] fold add(add(A, ~B), 1) -> sub(A, B).

@spatel I'm not sure, you tell me :) The history of this patch is that this pattern shows up in practice post legalization, so I submitted a patch for it for DAGCombiner. From there, @ lebedev.ri noticed that InstCombine wasn't doing it and suggested it to be added there as well.

Mar 12 2019, 12:59 PM · Restricted Project

Mar 11 2019

deadalnix updated the diff for D58877: [InstCombine] fold add(add(A, ~B), 1) -> sub(A, B).

Ping ?

Mar 11 2019, 7:31 AM · Restricted Project
deadalnix added inline comments to D57302: [DAGCombine] More diamond carry pattern optimization..
Mar 11 2019, 7:03 AM · Restricted Project
deadalnix created D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..
Mar 11 2019, 7:02 AM · Restricted Project
deadalnix added a child revision for D57302: [DAGCombine] More diamond carry pattern optimization.: D59208: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry..
Mar 11 2019, 7:02 AM · Restricted Project
deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..
  • rebase
  • Fix types
  • Remove unnecessary use of auto
  • Use a lambda
Mar 11 2019, 6:56 AM · Restricted Project

Mar 10 2019

deadalnix removed a parent revision for D57302: [DAGCombine] More diamond carry pattern optimization.: D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits..
Mar 10 2019, 6:31 PM · Restricted Project
deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Remove dependency on D57367 as now it show improvement on existing test cases.

Mar 10 2019, 6:31 PM · Restricted Project
deadalnix removed a child revision for D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits.: D57302: [DAGCombine] More diamond carry pattern optimization..
Mar 10 2019, 6:31 PM · Restricted Project
deadalnix committed rL355797: Add test case for add to sub post legalization. NFC.
Add test case for add to sub post legalization. NFC
Mar 10 2019, 6:25 PM
deadalnix committed rL355794: Remove redundant extractBooleanFlip argument. NFC.
Remove redundant extractBooleanFlip argument. NFC
Mar 10 2019, 5:37 PM

Mar 8 2019

deadalnix committed rL355769: Refactor isBooleanFlip into extractBooleanFlip so that users do not depend on….
Refactor isBooleanFlip into extractBooleanFlip so that users do not depend on…
Mar 8 2019, 6:53 PM
deadalnix committed rL355716: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).
[DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a)
Mar 8 2019, 11:39 AM
deadalnix closed D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).
Mar 8 2019, 11:39 AM · Restricted Project
deadalnix updated the diff for D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).

Update to reflect change in tests (the vector test had an incorrect constant in it).

Mar 8 2019, 9:17 AM · Restricted Project
deadalnix updated the diff for D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).

Rebase and regenerate tests introduced in rL355400

Mar 8 2019, 5:24 AM · Restricted Project

Mar 3 2019

deadalnix added a comment to D58877: [InstCombine] fold add(add(A, ~B), 1) -> sub(A, B).

Test for ((A + 1) + ~B) and ((~B + 1) + A) cases?

Mar 3 2019, 12:41 PM · Restricted Project
deadalnix added a comment to D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).

All the pattern I submit in DAGCombiner are extracted from actual code -in this case libraries doing cryptography). I never encountered the vector version of this but I'm happy to add test cases for them if this is of interest.

Mar 3 2019, 12:28 PM · Restricted Project
deadalnix updated the diff for D58877: [InstCombine] fold add(add(A, ~B), 1) -> sub(A, B).

Add extra ops to ensure proper ordering.

Mar 3 2019, 7:22 AM · Restricted Project
deadalnix committed rL355291: Add extra ops in add to sub transform test in order to enforce proper operand….
Add extra ops in add to sub transform test in order to enforce proper operand…
Mar 3 2019, 7:11 AM

Mar 2 2019

deadalnix added a comment to D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).

I made the patch for InstCombine: D58877

Mar 2 2019, 12:19 PM · Restricted Project
deadalnix created D58877: [InstCombine] fold add(add(A, ~B), 1) -> sub(A, B).
Mar 2 2019, 12:17 PM · Restricted Project
deadalnix committed rL355277: Add test case for add to sub transformation. NFC.
Add test case for add to sub transformation. NFC
Mar 2 2019, 12:11 PM
deadalnix added a comment to D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).

It is interesting that instcombine doesn't do this. I would have expected it to be the case. Let me prepare a patch for it.

Mar 2 2019, 11:30 AM · Restricted Project
deadalnix created D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a).
Mar 2 2019, 6:39 AM · Restricted Project
deadalnix committed rL355269: Add test case for add to sub transformation. NFC.
Add test case for add to sub transformation. NFC
Mar 2 2019, 6:28 AM

Mar 1 2019

deadalnix committed rL355260: [X86] Improve use of SHLD/SHRD.
[X86] Improve use of SHLD/SHRD
Mar 1 2019, 6:43 PM
deadalnix closed D57389: [X86] Improve use of SHLD/SHRD.
Mar 1 2019, 6:43 PM · Restricted Project
deadalnix updated the diff for D57389: [X86] Improve use of SHLD/SHRD.

Rebase and add test cases taht do not depend on D57367

Mar 1 2019, 6:35 PM · Restricted Project
deadalnix committed rL355258: Add test case for truncate funnel shifts. NFC.
Add test case for truncate funnel shifts. NFC
Mar 1 2019, 6:24 PM

Feb 21 2019

deadalnix added a comment to D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits..

@niravd Any progress ?

Feb 21 2019, 1:34 PM · Restricted Project
deadalnix updated the diff for D57389: [X86] Improve use of SHLD/SHRD.

rebase on top of rL353626

Feb 21 2019, 1:32 PM · Restricted Project

Feb 8 2019

deadalnix added a comment to D57317: [DAGCombine] Deduplicate addcarry node using commutativity..

@RKSimon This can go now, but has no effect in isolation in any of the test cases I have, mainly because DAGCombine is fairly powerless when faced with addcarry as most of the work involve 'deep' patterns. Do you think I should land anyways ?

Feb 8 2019, 7:15 AM · Restricted Project

Feb 4 2019

Herald added a project to D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits.: Restricted Project.

Ping ?

Feb 4 2019, 6:19 PM · Restricted Project

Jan 31 2019

Herald added a project to D57389: [X86] Improve use of SHLD/SHRD: Restricted Project.

@RKSimon That sound reasonable. The main motivation for this patch is to fix a regression introduced by D57367 , so would that be possible to get at least a concept ack on it ?

Jan 31 2019, 5:23 PM · Restricted Project

Jan 29 2019

deadalnix added inline comments to D57389: [X86] Improve use of SHLD/SHRD.
Jan 29 2019, 5:24 PM · Restricted Project
deadalnix added a child revision for D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits.: D57389: [X86] Improve use of SHLD/SHRD.
Jan 29 2019, 9:36 AM · Restricted Project
deadalnix added a parent revision for D57389: [X86] Improve use of SHLD/SHRD: D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits..
Jan 29 2019, 9:36 AM · Restricted Project
deadalnix created D57389: [X86] Improve use of SHLD/SHRD.
Jan 29 2019, 7:43 AM · Restricted Project

Jan 28 2019

deadalnix removed a parent revision for D57317: [DAGCombine] Deduplicate addcarry node using commutativity.: D33587: [DAGCombine] Do several rounds of combine..
Jan 28 2019, 7:35 PM · Restricted Project
deadalnix removed a child revision for D33587: [DAGCombine] Do several rounds of combine.: D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jan 28 2019, 7:35 PM · Restricted Project
deadalnix added a parent revision for D57302: [DAGCombine] More diamond carry pattern optimization.: D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits..
Jan 28 2019, 7:35 PM · Restricted Project
deadalnix added a child revision for D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits.: D57302: [DAGCombine] More diamond carry pattern optimization..
Jan 28 2019, 7:35 PM · Restricted Project
deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Fix typos.
Rebase on top of D57367

Jan 28 2019, 7:34 PM · Restricted Project
deadalnix added a comment to D33587: [DAGCombine] Do several rounds of combine..

I was thinking about ways to reduce the overhead created by this change. I came up with D57367, which is an alternative that focuses on nodes likely to benefit from the change instead of the whole DAG. It misses several opportunity that exist in that patch, but it seems to be a tradeof worth doing.

Jan 28 2019, 7:16 PM · Restricted Project
deadalnix created D57367: [DAGCombine] Do several rounds of combine for nodes using SimplifyDemandedBits..
Jan 28 2019, 7:09 PM · Restricted Project
deadalnix added a comment to D33587: [DAGCombine] Do several rounds of combine..

I don't see changes to addcarry.ll and subborrow.ll in this patch. So do we not have test cases from your workloads that show the benefit of this patch?

Jan 28 2019, 6:09 PM · Restricted Project
deadalnix added a comment to D33587: [DAGCombine] Do several rounds of combine..

First about the kind of code I try to get to have better codegen, it's mostly about large integer manipulations. I already added a fair amount of reduced test cases in addcarry.ll/subcarry.ll . I'm at a stage where the pattern I have to work with are somewhat deep, see D57302 for an example. These patterns do not do anything useful if other transform cannot pick up from whee they left.

Jan 28 2019, 4:31 PM · Restricted Project
deadalnix updated the diff for D57317: [DAGCombine] Deduplicate addcarry node using commutativity..

Add a comment about existing commutative ops deduplication logic.

Jan 28 2019, 2:53 PM · Restricted Project
deadalnix added inline comments to D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jan 28 2019, 10:30 AM · Restricted Project
deadalnix added inline comments to D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jan 28 2019, 6:11 AM · Restricted Project
deadalnix created D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jan 28 2019, 2:34 AM · Restricted Project
deadalnix added a child revision for D57302: [DAGCombine] More diamond carry pattern optimization.: D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jan 28 2019, 2:34 AM · Restricted Project
deadalnix added a child revision for D33587: [DAGCombine] Do several rounds of combine.: D57317: [DAGCombine] Deduplicate addcarry node using commutativity..
Jan 28 2019, 2:34 AM · Restricted Project

Jan 27 2019

deadalnix added inline comments to D33587: [DAGCombine] Do several rounds of combine..
Jan 27 2019, 6:51 PM · Restricted Project
deadalnix updated the diff for D57302: [DAGCombine] More diamond carry pattern optimization..

Fix NewY's type which was invalid in some circustances

Jan 27 2019, 10:55 AM · Restricted Project
deadalnix retitled D57302: [DAGCombine] More diamond carry pattern optimization. from [DAGCombine] More diamong carry pattern optimization. to [DAGCombine] More diamond carry pattern optimization..
Jan 27 2019, 9:52 AM · Restricted Project
deadalnix added a comment to D33587: [DAGCombine] Do several rounds of combine..

I get it now. We had a mismatched interpretation of which side is up, which side is down. If this is indeed the order in which nodes are processed, then it'd be beneficial to change this.

Jan 27 2019, 9:51 AM · Restricted Project
deadalnix created D57302: [DAGCombine] More diamond carry pattern optimization..
Jan 27 2019, 9:48 AM · Restricted Project
deadalnix added a comment to D33587: [DAGCombine] Do several rounds of combine..

After thinking more about this, I do not think going bottom up is a good idea. All patterns match a node + its operands, and so benefit from operand to be combined themselves already. I do not think changing all the patterns to match use rather than operands is a good idea. This is a ton of work, and this is unclear there is any benefit at all.

Jan 27 2019, 6:42 AM · Restricted Project

Jan 26 2019

deadalnix added a comment to D33587: [DAGCombine] Do several rounds of combine..

I'm not sure how processing nodes bottom up really helps. Problems arise when you want to use patterns of depth > 2 because then direct parent.child are not processed again, even though such pattern may now be available. It seems to me that both top/down and bottom/up approaches would suffers from the same problem, but maybe there is something I'm missing.

Jan 26 2019, 8:07 PM · Restricted Project
deadalnix updated the diff for D33587: [DAGCombine] Do several rounds of combine..

I'd like to ressurect this diff.

Jan 26 2019, 5:42 PM · Restricted Project
deadalnix committed rL352285: Generate test results for combine-fcopysign.ll using update_llc_test_checks.py ..
Generate test results for combine-fcopysign.ll using update_llc_test_checks.py .
Jan 26 2019, 10:14 AM

Aug 15 2018

deadalnix added a comment to D47718: [Mips] Use UADDO/ADDCARRY instead of ADDC/ADDE.

@atanasyan The behavior is not supposed to change in any way, so test cases should not change. However, there are doubt about semantic for which there is no test case today.

Aug 15 2018, 2:16 PM

Jun 6 2018

deadalnix added inline comments to D47718: [Mips] Use UADDO/ADDCARRY instead of ADDC/ADDE.
Jun 6 2018, 3:08 PM