[PATCH] [SeparateConstOffsetFromGEP] inbounds zext => sext for better splitting

Jingyue Wu jingyue at google.com
Sat Jun 7 21:44:58 PDT 2014


Hi eliben, meheff,

For each array index of GEP in the form of zext(a), convert it to sext(a)
if we can prove zext(a) <= max signed value of typeof(a). The conversion
helps to split zext(x + y) into sext(x) + sext(y).

Depends on D4056

http://reviews.llvm.org/D4060

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: D4060.10215.patch
Type: text/x-patch
Size: 8481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140608/4aa20ac8/attachment.bin>


More information about the llvm-commits mailing list