search for: simplifyusingdistributivelaws

Displaying 5 results from an estimated 5 matches for "simplifyusingdistributivelaws".

2017 Jul 14
2
failing to optimize boolean ops on cmps
Going back to the original problem. Why shouldn't SimplifyUsingDistributiveLaws handle both these cases? For the bitwise test case if you distribute you get (~A | A) & (B | A) The left side of that simplifies to all 1s which is the identify value for and. So even though the right side doesn't simplify it's a win. ~Craig On Fri, Jul 14, 2017 at 11:46 AM, Hal Fin...
2017 Jul 14
5
failing to optimize boolean ops on cmps
> > > Not sure about this last part. It is really going to require work by us to > rewrite things. :-) In the mean time, I think we should go ahead with this. > FWIW: My problem is, when put in this framework, we will repeatedly make this same decision, this same way, again and again, and never actually get even started on fixing it :) IE "it's just another small
2018 May 18
0
more reassociation in IR
...se easily, I'll abandon D45842. Also, I don't know if it's better to include that functionality as another iteration of the existing -reassociate or split it off as its own pass. But I think it should do the distributive simplifications that are currently in -instcombine (InstCombiner::SimplifyUsingDistributiveLaws). Using that instsimplify logic for analysis lets us decide if the reassociation is worthwhile in the 1st place, it removes the risk that some other pass would somehow mess up the pattern before instcombine could zap it, and it reduces the burden on instcombine to be the entire optimizer. :) On M...
2017 Sep 13
3
How to add optimizations to InstCombine correctly?
There is in fact a transform out there somewhere that reverses yours. define i64 @foo(i64 %a) { %b = shl i64 %a, 5 %c = add i64 %b, %a ret i64 %c } becomes define i64 @foo(i64 %a) { %c = mul i64 %a, 33 ret i64 %c } ~Craig On Wed, Sep 13, 2017 at 10:11 AM, Craig Topper <craig.topper at gmail.com> wrote: > Your code seems fine. InstCombine can infinite loop if some other
2018 May 14
3
more reassociation in IR
On Fri, May 11, 2018 at 7:20 PM Hal Finkel <hfinkel at anl.gov> wrote: > > On 05/11/2018 08:40 PM, Daniel Berlin via llvm-dev wrote: > > > > On Fri, May 11, 2018 at 2:37 PM, Hiroshi Yamauchi <yamauchi at google.com> > wrote: > >> >> >> On Thu, May 10, 2018 at 12:49 PM Daniel Berlin <dberlin at dberlin.org> >> wrote: >>