[llvm-dev] Early CSE clobbering llvm.assume

Josh Klontz via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 10 10:42:01 PDT 2016


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.

v/r,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160610/0498933f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: after-early-cse.ll
Type: application/octet-stream
Size: 3903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160610/0498933f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: before-early-cse.ll
Type: application/octet-stream
Size: 4615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160610/0498933f/attachment-0001.obj>


More information about the llvm-dev mailing list