https://llvm.org/bugs/show_bug.cgi?id=23894
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: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 14496
--> https://llvm.org/bugs/attachment.cgi?id=14496&action=edit
testcase
@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
code:
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs