[PATCH] Little improvement in IndVarSimplify

Michele Scandale michele.scandale at gmail.com
Mon Jun 24 09:12:17 PDT 2013


Hi everybody,

I would like to propose a little improvement to IndVarSimplify pass. The
attached patch adds a special handling of the case where, during the loop exit
condition rewriting, the exit value is a constant of bitwidth lower than the
type of the induction variable: instead of introducing a trunc operation in
order to match correctly the operand types, it allows to convert the constant
value to an equivalent constant, depending on the initial value of the induction
variable and the trip count, in order have an equivalent comparison between the
induction variable and the new constant.

Thanks in advance.

Michele Scandale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indvars-improvement.patch
Type: text/x-patch
Size: 2816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130624/f02cb163/attachment.bin>


More information about the llvm-commits mailing list