llvm-project/llvm/test/Transforms/SCCP
Nikita Popov d74212987b [ConstantFold] Remove unnecessary bounded index restriction
The fold for merging a GEP of GEP into a single GEP currently bails
if doing so would result in notional overindexing. The justification
given in the comment above this check is dangerously incorrect: GEPs
with notional overindexing are perfectly fine, and if some code
treats them incorrectly, then that code is broken, not the GEP.
Such a GEP might legally appear in source IR, so only preventing
its creation cannot be sufficient. (The constant folder also ends
up canonicalizing the GEP to remove the notional overindexing, but
that's neither here nor there.)

This check dates back to
bd4fef4a89,
and as far as I can tell the original issue this was trying to
patch around has since been resolved.

Differential Revision: https://reviews.llvm.org/D116587
2022-01-04 15:23:09 +01:00
..
2002-05-02-MissSecondInst.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2002-05-20-MissedIncomingValue.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2002-05-21-InvalidSimplify.ll
2002-08-30-GetElementPtrTest.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2003-06-24-OverdefinedPHIValue.ll
2003-08-26-InvokeHandling.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2004-11-16-DeadInvoke.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2004-12-10-UndefBranchBug.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2006-10-23-IPSCCP-Crash.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2006-12-04-PackedType.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2006-12-19-UndefBug.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2007-05-16-InvokeCrash.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2008-01-27-UndefCorrelate.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2008-04-22-multiple-ret-sccp.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2008-05-23-UndefCallFold.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2008-06-09-WeakProp.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2009-01-14-IPSCCP-Invoke.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2009-05-27-VectorOperandZero.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
2009-09-24-byval-ptr.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
PR16052.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
PR26044.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
PR43857.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apfloat-basictest.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-array.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-basictest.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-basictest2.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-basictest3.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-basictest4.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-bigarray.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-bigint.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-bigint2.ll [ConstantFold] Remove unnecessary bounded index restriction 2022-01-04 15:23:09 +01:00
apint-ipsccp1.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-ipsccp2.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-ipsccp3.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-ipsccp4.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-load.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-phi.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-select.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
apint-xor.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
arg-count-mismatch.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
arg-type-mismatch.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
assume.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
atomic-load-store.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
atomic.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
binaryops-constexprs.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
binaryops-range-special-cases.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
bitcast.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
calltest.ll [IR] Consider non-willreturn as side effect (PR50511) 2021-07-26 16:35:14 +02:00
clang-arc-rv.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
comdat-ipo.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
conditions-iter-order.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
conditions-ranges-with-undef.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
conditions-ranges.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
constant-range-struct.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
constant-struct.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
crash.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
dangling-block-address.ll
deadarg.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
definite-initializer.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
domtree-update.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
dont-zap-return.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
float-nan-simplification.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
float-phis.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
fp-bc-icmp-const-fold.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
global-alias-constprop.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
global.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
indirectbr.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
int-phis.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
intrinsics.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ip-add-range-to-call.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ip-constant-ranges.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ip-ranges-binaryops.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ip-ranges-casts.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ip-ranges-phis.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ip-ranges-select.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ip-ranges-sext.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-addr-taken.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-basic.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-branch-unresolved-undef.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-clear-returned.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-cycles.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-phi-one-pred-dead.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-predinfo-order.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-preserve-analysis.ll [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
ipsccp-range-crashes.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipsccp-ssa-copy-nested-conds.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ipscp-drop-argmemonly.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
latticeval-invalidate.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
load-store-range.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
loadtest.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
loadtest2.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
logical-nuke.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
metadata.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
multiple_callbacks.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
musttail-call.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
naked-return.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
openmp_parallel_for.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
overdefined-div.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
overdefined-ext.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
phi-cycle.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
phis.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
pr27712.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
pr35357.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
pr45185-range-predinfo.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
pr49582-iterator-invalidation.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
pr52253.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
predicateinfo-cond.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
preserve-analysis.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
pthreads.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
range-and-ip.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
range-and.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ranges-sext.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
recursion.ll
remove-call-inst.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
replace-dereferenceable-ptr-with-undereferenceable.ll [ConstantFold] Remove unnecessary bounded index restriction 2022-01-04 15:23:09 +01:00
report-changed.ll [SCCP] Properly report changes when changing a pointer argument 2021-10-11 13:12:08 -07:00
resolvedundefsin-tracked-fn.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
return-argument.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
return-constant.ll
return-constants.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
return-zapped.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
retvalue-undef.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
sccptest.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
select.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
solve-after-each-resolving-undefs-for-function.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
struct-arg-resolve-undefs.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
switch-constantfold-crash.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
switch-multiple-undef.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
switch-undef-constantfoldterminator.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
switch.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
thread_local_acs.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ub-shift.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ubsan_overflow.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
undef-resolve.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
user-with-multiple-uses.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
vector-bitcast.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
widening.ll [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00