llvm-project/llvm/test/Analysis/ConstantFolding
Peter Collingbourne c7d281905b Prevent Constant Folding From Optimizing inrange GEP
This patch does the following things:

1. update SymbolicallyEvaluateGEP so that it bails out if it cannot preserve inrange arribute;
2. update llvm/test/Analysis/ConstantFolding/gep.ll to remove UB in it;
3. remove inaccurate comment above ConstantFoldInstOperandsImpl in llvm/lib/Analysis/ConstantFolding.cpp;
4. add a new regression test that makes sure that no optimizations change an inrange GEP in an unexpected way.

Patch by Zhaomo Yang!

Differential Revision: https://reviews.llvm.org/D51698

llvm-svn: 341888
2018-09-11 01:53:36 +00:00
..
cast-vector.ll
funnel-shift.ll [ConstantFolding] add simplifications for funnel shift intrinsics 2018-08-17 13:23:44 +00:00
gep-constanfolding-error.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
gep-zeroinit-vector.ll [ConstantFold] Disallow folding vector geps into bitcasts 2018-06-01 19:34:35 +00:00
gep.ll Prevent Constant Folding From Optimizing inrange GEP 2018-09-11 01:53:36 +00:00
timeout.ll
vector-undef-elts.ll [InstCombine] remove unnecessary shuffle undef folding 2018-08-29 13:24:34 +00:00
vectorgep-crash.ll [ConstantFolding, InstSimplify] Handle more vector GEPs 2018-03-15 16:00:29 +00:00