[llvm-bugs] [Bug 26026] New: Constant vectors do not support ConstantExprs
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 4 23:44:35 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26026
Bug ID: 26026
Summary: Constant vectors do not support ConstantExprs
Product: libraries
Version: trunk
Hardware: Macintosh
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Interpreter
Assignee: unassignedbugs at nondot.org
Reporter: btaylor at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 15558
--> https://llvm.org/bugs/attachment.cgi?id=15558&action=edit
Patch to enable ConsantExpr evaluation for constant vectors
I am working on a project that uses integer vectors fairly extensively. Some
values in the vectors came from constant pointers cast to 64-bit integers, and
the LLVM optimizer would often end up folding values into instructions that
looked like this:
store <2 x i64> <i64 ptrtoint (... constant_pointer_value ... to i64), i64 0>,
<2 x i64>* %f
ExecutionEngine aborts at runtime on all instructions like this because
ExecutionEngine::getConstantValue assumes all vector constants are "simple
constants" whose values are ConstantInts, not handling the case of
ConstantExpr.
I attached a patch, which you can also see in my git branch here -
https://github.com/finiteloop/llvm/commit/a7ad5bdbbab509d2a7d8c5af35e436e2b72730c4
--
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/20160105/fce8549e/attachment-0001.html>
More information about the llvm-bugs
mailing list