[LLVMdev] Missed constant replacement opportunity with llvm.assume?

Josh Klontz josh.klontz at gmail.com
Sat Mar 28 11:00:45 PDT 2015

Opened a bug with a minimum reproducing example:


It seems to me the issue is that InstCombiner successfully simplifies
return values when they can be proven constant, but misses the same
optimization opportunity for store values.


On Fri, Mar 27, 2015 at 11:29 AM, Josh Klontz <josh.klontz at gmail.com> wrote:

> As of ToT it seems that even the simplest cases of assumes involving
> equality between an instruction and a constant don't cause an instruction
> RAUW constant.
> In the attached example, %channels is assumed to be 3, leading to a missed
> optimization opportunity with %src_c.
> Am I overlooking something that would cause this optimization to be
> invalid?
> v/r,
> Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150328/574d2b51/attachment.html>

More information about the llvm-dev mailing list