llvm-project/llvm/test
Daniel Neilson 367c2aea4e [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
2018-04-05 18:51:45 +00:00
..
Analysis [X86][CostModel] Use generic SSE levels instead of particular CPUs for shuffle costs 2018-04-04 11:14:12 +00:00
Assembler Make the LLParser accept call instructions of variables in the program AS 2018-02-27 11:15:11 +00:00
Bindings Add C API bindings for DIBuilder 'Type' APIs 2018-04-02 00:17:40 +00:00
Bitcode [IR] Upgrade comment token in objc retain release marker 2018-04-05 02:44:46 +00:00
BugPoint
CodeGen [X86] Synchronize the SchedRW on some EVEX instructions with their VEX equivalents. 2018-04-05 18:38:45 +00:00
DebugInfo Re-commit r329179 after fixing build&test issues 2018-04-04 14:42:14 +00:00
Examples
ExecutionEngine [RuntimeDyld][MachO] Fix assertion in encodeAddend, add missing directive to 2018-03-01 01:44:33 +00:00
Feature Remove the LoopInstSimplify pass (-loop-instsimplify) 2018-03-12 20:49:42 +00:00
FileCheck
Instrumentation hwasan: add -hwasan-match-all-tag flag 2018-04-04 20:44:59 +00:00
Integer
JitListener
LTO Object: Fix handling of @@@ in .symver directive 2018-03-20 00:45:03 +00:00
Linker [DebugInfo] Add remaining files to r325970 2018-02-23 23:13:18 +00:00
MC [WebAssembly] Allow for the creation of user-defined custom sections 2018-04-05 17:01:39 +00:00
Object Disable a test using environment variables that requires a real shell 2018-04-03 18:19:52 +00:00
ObjectYAML [WebAssembly] Disallow weak undefined globals in the object format 2018-03-09 16:30:44 +00:00
Other [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass 2018-03-23 21:46:16 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen TableGen: Support Intrinsic values in SearchableTable 2018-04-01 17:08:58 +00:00
ThinLTO/X86 [ThinLTO] Clear dllimport when setting dso_local. 2018-03-13 15:24:51 +00:00
Transforms [InstCombine] Properly change GEP type when reassociating loop invariant GEP chains 2018-04-05 18:51:45 +00:00
Unit
Verifier [DebugInfo] Add verifier for DICompositeType vector 2018-03-08 19:31:37 +00:00
YAMLParser
tools [MC][Tablegen] Allow models to describe the retire control unit for llvm-mca. 2018-04-05 15:41:41 +00:00
.clang-format
CMakeLists.txt Remove llvm-mcmarkup. 2018-04-02 23:17:55 +00:00
TestRunner.sh
lit.cfg.py Remove llvm-mcmarkup. 2018-04-02 23:17:55 +00:00
lit.site.cfg.py.in