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: unassignedb...@nondot.org Reporter: btay...@gmail.com CC: llvm-bugs@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs