summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDaniel Neilson <dneilson@azul.com>2018-04-05 18:51:45 +0000
committerDaniel Neilson <dneilson@azul.com>2018-04-05 18:51:45 +0000
commit367c2aea4ef30691f8843c8858cdab43c8339983 (patch)
treeabb69256f215f49817e59f87d6ab7bad88d463d8 /clang/lib/Frontend/CompilerInvocation.cpp
parent9eec2025c51fa916faa21f4f822bebd4016c11f1 (diff)
downloadbcm5719-llvm-367c2aea4ef30691f8843c8858cdab43c8339983.tar.gz
bcm5719-llvm-367c2aea4ef30691f8843c8858cdab43c8339983.zip
[InstCombine] Properly change GEP type when reassociating loop invariant GEP chains
Summary: This is a fix to PR37005. Essentially, rL328539 ([InstCombine] reassociate loop invariant GEP chains to enable LICM) contains a bug whereby it will convert: %src = getelementptr inbounds i8, i8* %base, <2 x i64> %val %res = getelementptr inbounds i8, <2 x i8*> %src, i64 %val2 into: %src = getelementptr inbounds i8, i8* %base, i64 %val2 %res = getelementptr inbounds i8, <2 x i8*> %src, <2 x i64> %val By swapping the index operands if the GEPs are in a loop, and %val is loop variant while %val2 is loop invariant. This fix recreates new GEP instructions if the index operand swap would result in the type of %src changing from vector to scalar, or vice versa. Reviewers: sebpop, spatel Reviewed By: sebpop Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45287 llvm-svn: 329331
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud