llvm-project/llvm/test/Transforms
Roman Lebedev 7ea46aee36
Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions"
Assume bundle can have more than one entry with the same name,
but at least AlignmentFromAssumptionsPass::extractAlignmentInfo() uses
getOperandBundle("align"), which internally assumes that it isn't the
case, and happily crashes otherwise.

Minimal reduced reproducer: run `opt -alignment-from-assumptions` on

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%0 = type { i64, %1*, i8*, i64, %2, i32, %3*, i8* }
%1 = type opaque
%2 = type { i8, i8, i16 }
%3 = type { i32, i32, i32, i32 }

; Function Attrs: nounwind
define i32 @f(%0* noalias nocapture readonly %arg, %0* noalias %arg1) local_unnamed_addr #0 {
bb:
  call void @llvm.assume(i1 true) [ "align"(%0* %arg, i64 8), "align"(%0* %arg1, i64 8) ]
  ret i32 0
}

; Function Attrs: nounwind willreturn
declare void @llvm.assume(i1) #1

attributes #0 = { nounwind "reciprocal-estimates"="none" }
attributes #1 = { nounwind willreturn }


This is what we'd have with -mllvm -enable-knowledge-retention

This reverts commit c95ffadb24.
2020-07-04 23:49:23 +03:00
..
ADCE [ADCE] Fix incorrect reporting of CFG changes 2020-04-14 20:26:13 +07:00
AddDiscriminators
AggressiveInstCombine
AlignmentFromAssumptions Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-04 23:49:23 +03:00
ArgumentPromotion [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
AtomicExpand Handle part-word LL/SC in atomic expansion pass 2020-04-28 10:07:39 -05:00
Attributor [CallGraph] Add support for callback call sites 2020-07-01 13:44:11 -07:00
BDCE
BlockExtractor
BranchFolding
CallSiteSplitting BreakCriticalEdges for callbr indirect dests 2020-06-17 11:45:06 -07:00
CalledValuePropagation
CanonicalizeAliases
CanonicalizeFreezeInLoops [TargetPassConfig] Add CanonicalizeFreezeInLoops before LSR 2020-05-28 05:21:12 +09:00
CodeExtractor [CodeExtractor] Fix extraction of a value used only by intrinsics outside of region 2020-04-25 11:44:47 +03:00
CodeGenPrepare BypassSlowDivision: Fix dropping debug info 2020-06-18 17:27:19 -04:00
ConstProp
ConstantHoisting
ConstantMerge
Coroutines [Coroutines] Optimize the lifespan of temporary co_await object 2020-06-28 10:18:15 -07:00
CorrelatedValuePropagation [LVI][CVP] Handle (x | y) < C style conditions 2020-07-01 20:43:24 +02:00
CrossDSOCFI
DCE Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
DeadArgElim Preserve DbgLoc when DeadArgumentElimination rewrites a 'ret'. 2020-05-29 10:00:33 -07:00
DeadStoreElimination DSE: fix builtin function recognition to take decl into account 2020-07-02 10:28:47 +01:00
DivRemPairs [ValueTracking] Fix crash in isGuaranteedNotToBeUndefOrPoison when V is in an unreachable block 2020-05-13 10:16:47 +09:00
EarlyCSE [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
EliminateAvailableExternally
EntryExitInstrumenter [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
ExpandMemCmp [ExpandMemCmp] Allow overlaping loads in the zero-relational case. 2020-04-02 11:20:47 +02:00
FixIrreducible FixIrreducible: don't crash when moving a child loop 2020-04-22 07:47:30 +05:30
Float2Int
ForcedFunctionAttrs
FunctionAttrs [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
FunctionImport
GCOVProfiling [gcov][test] Add mkdir -p %t && cd %t 2020-06-09 11:09:50 -07:00
GVN [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
GVNHoist
GVNSink Fix another instance where a variable was renamed in the generated LLVM IR. [NFC] 2020-03-23 22:53:29 -07:00
GlobalDCE
GlobalMerge
GlobalOpt [GlobalOpt] Remove preallocated calls when possible 2020-06-18 09:56:13 -07:00
GlobalSplit
GuardWidening [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
HardwareLoops [HardwareLoops] llvm.loop.decrement.reg definition 2020-05-21 10:48:16 +01:00
HotColdSplit
IPConstantProp [IR] Convert null-pointer-is-valid into an enum attribute 2020-05-15 19:41:07 +02:00
IRCE [NPM] Bail out when -foo and --passes=foo are both specified 2020-06-22 08:27:13 -07:00
IndVarSimplify [IndVars] Regenerate test checks (NFC) 2020-06-29 20:33:50 +02:00
IndirectBrExpand
InferAddressSpaces [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`. 2020-06-25 20:46:56 -04:00
InferFunctionAttrs [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
Inline Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-04 23:49:23 +03:00
InstCombine Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-04 23:49:23 +03:00
InstMerge [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
InstNamer [InstNamer] use 'i' for Instructions, not 'tmp' 2020-06-01 11:11:14 -04:00
InstSimplify [InstSimplify] Simplify comparison between zext(x) and sext(x) 2020-07-04 11:03:00 +02:00
InterleavedAccess [Alignment] Fix misaligned interleaved loads 2020-05-27 12:12:22 +00:00
Internalize
JumpThreading [JumpThreading] Make test more robust (NFC) 2020-06-20 13:05:42 +02:00
LCSSA
LICM [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
LoadStoreVectorizer [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopDataPrefetch
LoopDeletion [LoopDeletion] Emit a remark when a dead loop is deleted 2020-07-03 15:20:23 -07:00
LoopDistribute [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopFusion [LoopFusion] Update second loop guard non loop successor phis incoming 2020-06-09 21:14:51 +00:00
LoopIdiom [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopInstSimplify
LoopInterchange [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopLoadElim [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopPredication [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopReroll [LoopReroll] Fix rerolling loop with use outside the loop 2020-05-13 13:03:03 +09:00
LoopRotate [LoopRotate] Cleanup test checks to fix issue reported on D77354 2020-04-03 17:21:37 +01:00
LoopSimplify [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopSimplifyCFG
LoopStrengthReduce [NewPM][LSR] Rename strength-reduce -> loop-reduce 2020-07-02 11:15:29 -07:00
LoopTransformWarning
LoopUnroll [InstCombine] Always try to invert non-canonical predicate of an icmp 2020-07-04 18:12:04 +03:00
LoopUnrollAndJam [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopUnswitch [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopVectorize [LV] Enable the LoopVectorizer to create pointer inductions 2020-07-02 11:39:28 +01:00
LoopVersioning [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics LowerConstantIntrinsics: Fix missing test for byval behavior 2020-06-29 14:45:31 -04:00
LowerExpectIntrinsic Add support of __builtin_expect_with_probability 2020-06-22 10:21:28 -07:00
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Use alignment info when lowering loads/stores. 2020-06-18 13:19:31 +01:00
LowerSwitch
LowerTypeTests
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
MergeFunc Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
MergeICmps
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN [NewPM] Add -basic-aa to pr33196.ll 2020-07-02 11:27:52 -07:00
ObjCARC [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
OpenMP [OpenMPOpt] ICV macro definitions 2020-06-24 13:43:35 +02:00
PGOProfile [InstCombine] Always try to invert non-canonical predicate of an icmp 2020-07-04 18:12:04 +03:00
PartiallyInlineLibCalls
PhaseOrdering Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-04 23:49:23 +03:00
PlaceSafepoints
PreISelIntrinsicLowering Remove Passes dependency on CodeGen 2020-06-24 14:52:46 -07:00
PruneEH
Reassociate [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
Reg2Mem
RewriteStatepointsForGC [NPM] Bail out when -foo and --passes=foo are both specified 2020-06-22 08:27:13 -07:00
SCCP [SCCP] Turn sext into zext for non-negative ranges. 2020-06-19 10:17:55 +01:00
SLPVectorizer [SLP] Make sure instructions are ordered when computing spill cost. 2020-07-03 17:30:17 +01:00
SROA [SROA] convertValue(): we can have <N x iK*> to <M x iQ> cast 2020-06-25 00:58:54 +03:00
SafeStack [Instruction] Set metadata uses to undef on deletion 2020-05-21 15:58:12 -07:00
SampleProfile [Remarks] Add callsite locations to inline remarks 2020-06-20 23:32:10 -07:00
ScalarizeMaskedMemIntrin/X86
Scalarizer [NFC][Scalarizer] Also scalarize loads in newly-added tests 2020-07-03 02:37:29 +03:00
SeparateConstOffsetFromGEP Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
SimpleLoopUnswitch [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
SimplifyCFG [InstCombine] Always try to invert non-canonical predicate of an icmp 2020-07-04 18:12:04 +03:00
Sink [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
SpeculateAroundPHIs [NFC] Update tests 2020-05-05 15:28:40 +01:00
SpeculativeExecution SpeculativeExecution: fix incorrect debug info move 2020-06-28 14:35:00 +03:00
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols
StructurizeCFG [StructurizeCFG] Fix region nodes ordering 2020-06-01 12:50:35 +03:00
SyntheticCountsPropagation
TailCallElim [TRE] Allow accumulator elimination when base case returns non-constant 2020-06-04 10:34:42 -07:00
ThinLTOBitcodeWriter ThinLTOBitcodeWriter: drop dso_local when a GlobalVariable is converted to a declaration 2020-03-05 18:09:33 -08:00
TypePromotion/ARM
UnifyLoopExits Introduce unify-loop-exits pass. 2020-03-30 13:23:56 -04:00
UniqueInternalLinkageNames New pass to make internal linkage symbol names unique. 2020-04-20 15:05:22 -07:00
Util [Utils] Make -assume-builder/-assume-simplify actually work on Old-PM 2020-07-04 21:06:36 +03:00
VectorCombine/X86 [VectorCombine] try to form vector compare and binop to eliminate scalar ops 2020-06-29 10:38:52 -04:00
WholeProgramDevirt [WPD] Avoid noalias assumptions in unique return value optimization 2020-04-16 14:49:51 -07:00