[LLVMbugs] [Bug 23894] New: @llvm.assume is ignored in case of pointer values

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 19 04:59:36 PDT 2015


            Bug ID: 23894
           Summary: @llvm.assume is ignored in case of pointer values
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: tom.aernoudt at synopsys.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14496
  --> https://llvm.org/bugs/attachment.cgi?id=14496&action=edit

@llvm.assume does not trigger constant propgation in case of pointer values.

eg No constant propagation is done to the retun statement for the following

struct X { unsigned long long* a; };
unsigned long long* fail(X* x)
  __builtin_assume(x->a == (unsigned long long*)12345678);
  return x->a;

While for the following code this works as expected:

struct Y { unsigned long long a; };
unsigned long long ok(Y* y)
  __builtin_assume(y->a == 12345678);
  return y->a;

The attached testcase can be used to reproduce the issue.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150619/0d6d0169/attachment.html>

More information about the llvm-bugs mailing list