summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-11-18 13:14:32 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-11-18 13:14:32 +0000
commitb72cb4ec49ab5a937a53a4391bffce9d1b9b35ea (patch)
treefefd9068926caeedcca235ec4a6c2fb9c623853b /clang/lib/Frontend/CompilerInvocation.cpp
parent08d3cd163dd2686dba1d06b5628fc78b6c53e8d4 (diff)
downloadbcm5719-llvm-b72cb4ec49ab5a937a53a4391bffce9d1b9b35ea.tar.gz
bcm5719-llvm-b72cb4ec49ab5a937a53a4391bffce9d1b9b35ea.zip
LoopVectorizer: Extend the induction variable to a larger type
In some case the loop exit count computation can overflow. Extend the type to prevent most of those cases. The problem is loops like: int main () { int a = 1; char b = 0; lbl: a &= 4; b--; if (b) goto lbl; return a; } The backedge count is 255. The induction variable type is i8. If we add one to 255 to get the exit count we overflow to zero. To work around this issue we extend the type of the induction variable to i32 in the case of i8 and i16. PR17532 llvm-svn: 195008
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud