]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add unsigned type iv_cand for iv_use with non mode-precision type
authorBin Cheng <bin.cheng@linux.alibaba.com>
Mon, 4 May 2020 06:28:54 +0000 (14:28 +0800)
committerBin Cheng <bin.cheng@linux.alibaba.com>
Mon, 4 May 2020 06:28:54 +0000 (14:28 +0800)
commit28d68fde77363520d64b2a7ea480040cf7cb004d
tree02491c6d499eceeec9e80a8541b1b77ff1ab61fd
parent6f48762bb41df4eddefc34ea87f7bb88f4d61255
Add unsigned type iv_cand for iv_use with non mode-precision type

Precisely,  for iv_use if it's not integer/pointer type, or non-mode
precision type, add candidate for the corresponding scev in unsigned
type with the same precision, rather than its original type.

Backport from master.
2020-04-09  Bin Cheng  <bin.cheng@linux.alibaba.com>
    PR tree-optimization/93674

gcc/
    * tree-ssa-loop-ivopts.c (langhooks.h): New include.
    (add_iv_candidate_for_use): For iv_use of non integer or pointer type,
    or non-mode precision type, add candidate in unsigned type with the
    same precision.

gcc/testsuite/
    * g++.dg/pr93674.C: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr93674.C [new file with mode: 0644]
gcc/tree-ssa-loop-ivopts.c