[PATCH] D37121: [DivRemHoist] add a pass to move div/rem pairs into the same block (PR31028)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 08:07:12 PST 2018


spatel added a comment.

In https://reviews.llvm.org/D37121#1027165, @jlebar wrote:

> In https://reviews.llvm.org/D37121#1027143, @spatel wrote:
>
> > Are you confident that the problem is limited to cases with a constant div/rem operand and masking of the variable that could be replaced by a trunc?
>
>
> Actually I'm pretty confident the problem is *not* limited to such cases -- sorry for making a misleading testcase.  In the code I'm interested in, we know the bit-width of the dividend because of a branch on the dividend's value (x < some_constant) or because an llvm.assume tells us so.


Ah, then we'll need a stronger solution. If the shrinkability is based on propagation via cmp/br, then that's not something that instcombine would/should handle? Maybe we should add some shrinking logic to correlated-propagation?


Repository:
  rL LLVM

https://reviews.llvm.org/D37121





More information about the llvm-commits mailing list