1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Transforms/SCCP
Nikita Popov bab200ac44 [IR] Consider non-willreturn as side effect (PR50511)
This adjusts mayHaveSideEffect() to return true for !willReturn()
instructions. Just like other side-effects, non-willreturn calls
(aka "divergence") cannot be removed and cannot be reordered relative
to other side effects. This fixes a number of bugs where
non-willreturn calls are either incorrectly dropped or moved. In
particular, it also fixes the last open problem in
https://bugs.llvm.org/show_bug.cgi?id=50511.

I performed a cursory review of all current mayHaveSideEffect()
uses, which convinced me that these are indeed the desired default
semantics. Places that do not want to consider non-willreturn as a
sideeffect generally do not want mayHaveSideEffect() semantics at
all. I identified two such cases, which are addressed by D106591
and D106742. Finally, there is a use in SCEV for which we don't
really have an appropriate API right now -- what it wants is
basically "would this be considered forward progress". I've just
spelled out the previous semantics there.

Differential Revision: https://reviews.llvm.org/D106749
2021-07-26 16:35:14 +02: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
2008-06-09-WeakProp.ll
2009-01-14-IPSCCP-Invoke.ll
2009-05-27-VectorOperandZero.ll
2009-09-24-byval-ptr.ll
apfloat-basictest.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
apint-xor.ll
arg-count-mismatch.ll
arg-type-mismatch.ll
assume.ll
atomic-load-store.ll
atomic.ll
binaryops-constexprs.ll
binaryops-range-special-cases.ll [ConstantRanges] Use APInt for constant case for urem/srem. 2021-06-30 11:18:20 +01:00
bitcast.ll
calltest.ll [IR] Consider non-willreturn as side effect (PR50511) 2021-07-26 16:35:14 +02:00
clang-arc-rv.ll
comdat-ipo.ll
conditions-iter-order.ll
conditions-ranges-with-undef.ll
conditions-ranges.ll
constant-range-struct.ll
constant-struct.ll
crash.ll
dangling-block-address.ll
deadarg.ll
definite-initializer.ll
domtree-update.ll
dont-zap-return.ll
float-nan-simplification.ll
float-phis.ll
fp-bc-icmp-const-fold.ll
global-alias-constprop.ll
global.ll
indirectbr.ll
int-phis.ll
intrinsics.ll
ip-add-range-to-call.ll
ip-constant-ranges.ll
ip-ranges-binaryops.ll
ip-ranges-casts.ll
ip-ranges-phis.ll
ip-ranges-select.ll
ip-ranges-sext.ll
ipsccp-addr-taken.ll
ipsccp-basic.ll
ipsccp-branch-unresolved-undef.ll
ipsccp-clear-returned.ll
ipsccp-cycles.ll
ipsccp-phi-one-pred-dead.ll
ipsccp-predinfo-order.ll
ipsccp-preserve-analysis.ll
ipsccp-range-crashes.ll
ipsccp-ssa-copy-nested-conds.ll
ipscp-drop-argmemonly.ll
latticeval-invalidate.ll
load-store-range.ll
loadtest2.ll
loadtest.ll
logical-nuke.ll
metadata.ll
multiple_callbacks.ll
musttail-call.ll [Tests] Add missing willreturn attributes (NFC) 2021-07-24 17:17:48 +02:00
naked-return.ll
openmp_parallel_for.ll
overdefined-div.ll
phi-cycle.ll
phis.ll
pr27712.ll
pr35357.ll
pr45185-range-predinfo.ll
pr49582-iterator-invalidation.ll
PR16052.ll
PR26044.ll
PR43857.ll
predicateinfo-cond.ll
preserve-analysis.ll
pthreads.ll
range-and-ip.ll
range-and.ll
ranges-sext.ll
recursion.ll
remove-call-inst.ll [Tests] Add missing willreturn attributes (NFC) 2021-07-24 17:17:48 +02:00
replace-dereferenceable-ptr-with-undereferenceable.ll
resolvedundefsin-tracked-fn.ll
return-argument.ll
return-constant.ll
return-constants.ll
return-zapped.ll
retvalue-undef.ll
sccptest.ll
select.ll
solve-after-each-resolving-undefs-for-function.ll
struct-arg-resolve-undefs.ll
switch-constantfold-crash.ll
switch-multiple-undef.ll
switch-undef-constantfoldterminator.ll
switch.ll
thread_local_acs.ll
ub-shift.ll
ubsan_overflow.ll
undef-resolve.ll
user-with-multiple-uses.ll
vector-bitcast.ll
widening.ll