llvm-project/llvm/test/Transforms/LICM
Anna Thomas 8ee5759fd5 Strip undef implying attributes when moving calls
When hoisting/moving calls to locations, we strip unknown metadata. Such calls are usually marked `speculatable`, i.e. they are guaranteed to not cause undefined behaviour when run anywhere. So, we should strip attributes that can cause immediate undefined behaviour if those attributes are not valid in the context where the call is moved to.

This patch introduces such an API and uses it in relevant passes. See
updated tests.

Fix for PR50744.

Reviewed By: nikic, jdoerfert, lebedev.ri

Differential Revision: https://reviews.llvm.org/D104641
2021-07-27 10:57:05 -04:00
..
AArch64 [AArch64][SVE] Drop "argmemonly" from gather/scatter with vector base. 2020-09-25 16:01:05 -07:00
AMDGPU
Inputs [LICM] Make Loop ICM profile aware again 2020-09-15 17:21:58 -07:00
2003-02-26-LoopExitNotDominated.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
2003-02-27-NestedLoopExitBlocks.ll
2003-02-27-PreheaderExitNodeUpdate.ll
2003-02-27-PreheaderProblem.ll [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
2003-02-27-StoreSinkPHIs.ll
2003-02-28-PromoteDifferentType.ll
2003-05-02-LoadHoist.ll
2003-12-11-SinkingToPHI.ll Re-apply "[lli] Make -jit-kind=orc the default JIT engine" 2021-03-30 12:08:26 +02:00
2004-09-14-AliasAnalysisInvalidate.ll
2004-11-17-UndefIndexCrash.ll
2006-09-12-DeadUserOfSunkInstr.ll
2007-05-22-VolatileSink.ll
2007-07-30-AliasSet.ll [NewPM][LoopUnswitch] Pin loop-unswitch to legacy PM or use simple-loop-unswitch 2020-08-06 10:56:00 -07:00
2007-09-17-PromoteValue.ll
2007-09-24-PromoteNullValue.ll
2007-10-01-PromoteSafeValue.ll
2008-05-20-AliasSetVAArg.ll
2008-07-22-LoadGlobalConstant.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
2009-12-10-LICM-Indbr-Crash.ll
2011-04-06-HoistMissedASTUpdate.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
2011-04-06-PromoteResultOfPromotion.ll
2011-04-09-RAUW-AST.ll
2011-07-06-Alignment.ll
2014-09-10-doFinalizationAssert.ll
AliasSetMemSet.ll
PR19798.ll
PR21582.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
PR24013.ll
Preserve-LCSSA.ll [NewPM][LoopUnswitch] Pin loop-unswitch to legacy PM or use simple-loop-unswitch 2020-08-06 10:56:00 -07:00
alias-set-tracker-loss.ll
argmemonly-call.ll [NewPM][MSSA] Fix failures under NPM due to -enable-mssa-loop-dependency 2020-09-23 15:17:43 -07:00
assume.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
atomics.ll [NewPM][MSSA] Fix failures under NPM due to -enable-mssa-loop-dependency 2020-09-23 15:17:43 -07:00
basictest.ll
bisect-state.ll
call-hoisting.ll Strip undef implying attributes when moving calls 2021-07-27 10:57:05 -04:00
callbr-crash.ll
constexpr.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
convergent.ll Prevent LICM and machineLICM from hoisting convergent operations 2020-11-06 10:26:39 -08:00
crash.ll
debug-value.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
dropped-tbaa.ll Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
explicit_guards.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
extra-copies.ll
fence.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
freeze.ll
funclet.ll [Tests] Add missing willreturn attributes (NFC) 2021-07-24 17:17:48 +02:00
gc-relocate.ll [LICM] Fix a crash when sinking instructions w/token operands 2021-03-17 11:18:46 -07:00
guards.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
hoist-alloc.ll [nofree] Restrict semantics to memory visible to caller 2021-04-16 11:38:55 -07:00
hoist-bitcast-load.ll [LoopSimplifyCFG][NewPM] Rename simplify-cfg -> loop-simplifycfg 2020-09-21 08:27:19 -07:00
hoist-debuginvariant.ll
hoist-deref-load.ll [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
hoist-fast-fdiv.ll
hoist-invariant-load.ll [BasicAA] Rename -disable-basicaa to -disable-basic-aa to be consistent with the canonical name "basic-aa" 2020-06-26 20:55:44 -07:00
hoist-mustexec.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
hoist-nounwind.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
hoist-phi.ll
hoist-round.ll Update @llvm.powi to handle different int sizes for the exponent 2021-06-17 09:38:28 +02:00
hoisting-preheader-debugloc.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
hoisting.ll [SVE] Fix isLoadInvariantInLoop for scalable vectors 2020-09-15 08:30:19 +01:00
infinite_loops.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
int_sideeffect.ll
invariant.start.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
lcssa-ssa-promoter.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
lnicm.ll [LICM] Create LoopNest Invariant Code Motion (LNICM) pass 2021-07-20 00:31:18 +09:00
loopsink-pr38462.ll Reland: Expand existing loopsink testing to also test loopsinking using new pass manager and fix LICM bug. 2020-11-20 10:26:33 -05:00
loopsink-pr39570.ll Reland: Expand existing loopsink testing to also test loopsinking using new pass manager and fix LICM bug. 2020-11-20 10:26:33 -05:00
loopsink-pr39695.ll Reland: Expand existing loopsink testing to also test loopsinking using new pass manager and fix LICM bug. 2020-11-20 10:26:33 -05:00
loopsink.ll Reland: Expand existing loopsink testing to also test loopsinking using new pass manager and fix LICM bug. 2020-11-20 10:26:33 -05:00
no-hoist-prof.ll [LICM] Make Loop ICM profile aware again 2020-09-15 17:21:58 -07:00
no-preheader-test.ll
opt-remarks-conditional-load.ll
opt-remarks-intervening-store.ll
opt-remarks.ll
outer-loop-deleted-before-licm.ll
pr23608.ll [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
pr26843.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
pr27262.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
pr32129.ll [NewPM][LoopUnswitch] Pin loop-unswitch to legacy PM or use simple-loop-unswitch 2020-08-06 10:56:00 -07:00
pr35342.ll
pr36228.ll
pr37323.ll
pr38513.ll [BasicAA] Rename -disable-basicaa to -disable-basic-aa to be consistent with the canonical name "basic-aa" 2020-06-26 20:55:44 -07:00
pr40317.ll For some tests targeting SystemZ, -march=z13 ---> -mcpu=z13 2020-07-29 19:18:01 -07:00
pr42969.ll Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
pr50367.ll [LICM] Remove MaybePromotable set (PR50367) 2021-05-18 20:26:01 +02:00
pragma-licm-disable.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
preheader-safe.ll
promote-atomic.ll Reapply [LICM] Make promotion faster 2021-03-11 10:50:28 +01:00
promote-capture.ll [LICM] Make capture check more precise 2021-04-19 20:34:23 +02:00
promote-order.ll [NewPM][MSSA] Fix failures under NPM due to -enable-mssa-loop-dependency 2020-09-23 15:17:43 -07:00
promote-tls.ll [tbaa] Rename type-based-aa -> tbaa 2020-07-30 19:51:35 -07:00
read-only-calls.ll [NewPM][MSSA] Fix failures under NPM due to -enable-mssa-loop-dependency 2020-09-23 15:17:43 -07:00
read-volatile-register.ll AArch64+ARM: make LLVM consider system registers volatile. 2020-07-15 09:47:36 +01:00
scalar-promote-memmodel.ll [tbaa] Rename type-based-aa -> tbaa 2020-07-30 19:51:35 -07:00
scalar-promote-unwind.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
scalar-promote.ll [tbaa] Rename type-based-aa -> tbaa 2020-07-30 19:51:35 -07:00
sink-debuginfo-preserve.ll [LLVM IR] Allow volatile stores to trap. 2021-07-26 10:51:00 -07:00
sink-foldable.ll
sink-promote.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
sink-with-coroutine.ll [LICM][Coroutine] Don't sink stores from loops with coro.suspend instructions 2021-03-03 15:21:57 -08:00
sink.ll [LICM] Make Loop ICM profile aware again 2020-09-15 17:21:58 -07:00
sinking-debugify.ll [LICM] Extract debugify test (NFC) 2021-07-24 17:04:42 +02:00
sinking.ll [IR] Consider non-willreturn as side effect (PR50511) 2021-07-26 16:35:14 +02:00
speculate.ll
store-hoisting.ll [NewPM][MSSA] Fix failures under NPM due to -enable-mssa-loop-dependency 2020-09-23 15:17:43 -07:00
strlen.ll Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
unrolled-deeply-nested.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
update-scev.ll [test][NewPM] Fix update-scev.ll under NPM 2020-09-22 19:26:30 -07:00
volatile-alias.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00