1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/Transforms/SCCP
Davide Italiano b6d9bc9a26 [SCCP] Pick the right lattice value for constants.
After the dataflow algorithm proves that an argument is constant,
it replaces it value with the integer constant and drops the lattice
value associated to the DEF.

e.g. in the example we have @f() that's called twice:
call @f(undef, ...)
call @f(2, ...)

`undef` MEET 2 = 2 so we replace the argument and all its uses with
the constant 2.

Shortly after, tryToReplaceWithConstantRange() tries to get the lattice
value for the argument we just replaced, causing an assertion.
This function is a little peculiar as it runs when we're doing replacement
and not as part of the solver but still queries the solver.

The fix is that of checking whether we replaced the value already and
get a temporary lattice value for the constant.

Thanks to Zhendong Su for the report!

Fixes PR35357.

llvm-svn: 318817
2017-11-22 03:04:55 +00:00
..
2002-05-02-MissSecondInst.ll
2002-05-20-MissedIncomingValue.ll
2002-05-21-InvalidSimplify.ll
2002-08-30-GetElementPtrTest.ll
2003-06-24-OverdefinedPHIValue.ll
2003-08-26-InvokeHandling.ll
2004-11-16-DeadInvoke.ll
2004-12-10-UndefBranchBug.ll
2006-10-23-IPSCCP-Crash.ll
2006-12-04-PackedType.ll
2006-12-19-UndefBug.ll
2007-05-16-InvokeCrash.ll
2008-01-27-UndefCorrelate.ll
2008-04-22-multiple-ret-sccp.ll
2008-05-23-UndefCallFold.ll
2009-01-14-IPSCCP-Invoke.ll
2009-05-27-VectorOperandZero.ll
apint-array.ll
apint-basictest2.ll
apint-basictest3.ll
apint-basictest4.ll
apint-basictest.ll
apint-bigarray.ll
apint-bigint2.ll
apint-bigint.ll
apint-ipsccp1.ll
apint-ipsccp2.ll
apint-ipsccp3.ll
apint-ipsccp4.ll
apint-load.ll
apint-phi.ll
apint-select.ll
atomic-load-store.ll
atomic.ll
bitcast.ll
calltest.ll
comdat-ipo.ll
constant-struct.ll
crash.ll
definite-initializer.ll
dont-zap-return.ll
global-alias-constprop.ll
indirectbr.ll
ip-constant-ranges.ll Recommit r315288: [SCCP] Propagate integer range info for parameters in IPSCCP. 2017-10-30 10:07:42 +00:00
ipsccp-addr-taken.ll
ipsccp-basic.ll
loadtest.ll
logical-nuke.ll
overdefined-div.ll
pr27712.ll
pr35357.ll [SCCP] Pick the right lattice value for constants. 2017-11-22 03:04:55 +00:00
retvalue-undef.ll
sccptest.ll
select.ll
switch-multiple-undef.ll
switch.ll
ub-shift.ll
undef-resolve.ll
vector-bitcast.ll