[PATCH] Fixed several correctness issues in SeparateConstOffsetFromGEP
Jingyue Wu
jingyue at google.com
Sun Jun 1 19:31:47 PDT 2014
Hi eliben,
Most of these issues are mishandling s/zext.
Major issues:
1. When rebuilding new indices, s/zext should be distributed to sub-expressions. e.g., sext(a +nsw (b +nsw 5)) = sext(a) + sext(b) + 5 but not sext(a + b) + 5.
2. Function find should consider the bitwidth of the constant offset instead of always sign-extending it to i64.
Added many tests to verify the changes we made.
http://reviews.llvm.org/D3985
Files:
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3985.9999.patch
Type: text/x-patch
Size: 43080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140602/4c7c60ea/attachment.bin>
More information about the llvm-commits
mailing list