[PATCH] [InstSimplify] Support constant folding to vector of pointers
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Thu Oct 16 16:32:41 PDT 2014
Hi arsenm, chandlerc, bkramer,
ConstantFolding crashes when trying to InstSimplify the following load:
@a = private unnamed_addr constant %mst {
i8* inttoptr (i64 -1 to i8*),
i8* inttoptr (i64 -1 to i8*)}, align 8
%x = load <2 x i8*>* bitcast (%mst* @a to <2 x i8*>*), align 8
This patch fix this by adding support to this type of folding:
%x = load <2 x i8*>* bitcast (%mst* @a to <2 x i8*>*), align 8
==> gets folded to:
%x = <2 x i8*> <i8* inttoptr (i64 -1 to i8*), i8* inttoptr (i64 -1 to i8*)>
http://reviews.llvm.org/D5834
Files:
lib/Analysis/ConstantFolding.cpp
test/Transforms/InstSimplify/vector_ptr_bitcast.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5834.15054.patch
Type: text/x-patch
Size: 2711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141016/2b3f8d84/attachment.bin>
More information about the llvm-commits
mailing list