[llvm-dev] Early CSE clobbering llvm.assume
Josh Klontz via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 10 11:08:00 PDT 2016
On second thought, I don't have a workaround. I had been relying on
EarlyCSE + GVN to combine %channels and %channels4, which I would then
replace with the constant 3. If I run my optimization before these passes
then I have no way of knowing %channels4 can be replaced with the constant
On Fri, Jun 10, 2016 at 11:42 AM, Josh Klontz <josh.klontz at gmail.com> wrote:
> As of llvm 3.8, the early CSE pass seems to remove llvm.assume intrinsics.
> Is this the expected behavior?
> I've attached as small-ish example of this happening in my production code.
> $ opt -early-cse before-early-cse.ll -S > after-early-cse.ll
> Note the use of the assume intrinsic indicating that the loaded value
> %channels equals 3. In a later pass I replace the load instruction with the
> constant value. This approach worked in llvm 3.7. I can solve the issue by
> moving my pass before early CSE if need be.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev