llvm-6502/test/Transforms
Pawel Bylica 59764b94a7 Constfold insertelement to undef when index is out-of-bounds
Summary:
This patch adds constant folding of insertelement instruction to undef value when index operand is constant and is not less than vector size or is undef.

InstCombine does not support this case, but I'm happy to add it there also if this change is accepted.

Test Plan: Unittests and regression tests for ConstProp pass.

Reviewers: majnemer

Reviewed By: majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9287

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235854 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 09:30:49 +00:00
..
ADCE
AddDiscriminators DebugInfo: Fix testcases that fail -verify-debug-info=true 2015-03-16 21:10:12 +00:00
AlignmentFromAssumptions
ArgumentPromotion [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
AtomicExpand/ARM
BBVectorize
BDCE
BranchFolding
CodeExtractor
CodeGenPrepare [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
ConstantHoisting [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
ConstantMerge
ConstProp Constfold insertelement to undef when index is out-of-bounds 2015-04-27 09:30:49 +00:00
CorrelatedValuePropagation
DeadArgElim [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
DeadStoreElimination DebugInfo: Add missing !dbg attachments to intrinsics 2015-04-15 21:04:10 +00:00
EarlyCSE
Float2Int Reapply r233175 and r233183: float2int. 2015-03-27 10:36:57 +00:00
FunctionAttrs [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
GCOVProfiling [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
GlobalDCE [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
GlobalOpt [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
GVN [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
IndVarSimplify [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Inline [InlineFunction] Don't add lifetime markers for zero-sized allocas. 2015-04-20 16:11:05 +00:00
InstCombine [x86] instcombine more cases of insertps into a shufflevector 2015-04-25 20:55:25 +00:00
InstMerge
InstSimplify [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Internalize
IPConstantProp Skip extra LLVM IR assemble/disassemble steps in some tests 2015-04-24 18:06:09 +00:00
IRCE [IRCE] Fix a regression introduced in r232444. 2015-03-24 19:29:18 +00:00
JumpThreading [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LCSSA [opaque pointer type] Add textual IR support for explicit type parameter to the invoke instruction 2015-04-24 19:32:54 +00:00
LICM [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LoadCombine
LoopDeletion
LoopIdiom DebugInfo: Fix bad debug info for compile units and types 2015-03-27 20:46:33 +00:00
LoopInterchange Add support to interchange loops with reductions. 2015-04-23 04:51:44 +00:00
LoopReroll
LoopRotate [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LoopSimplify Verifier: Call verifyModule() from llc and opt 2015-03-27 22:04:28 +00:00
LoopStrengthReduce [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LoopUnroll [LoopUnrollRuntime] Avoid high-cost trip count computation. 2015-04-14 03:20:38 +00:00
LoopUnswitch [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LoopVectorize DebugInfo: Fix bad debug info for compile units and types 2015-03-27 20:46:33 +00:00
LowerAtomic
LowerBitSets LowerBitSets: Avoid reusing byte set addresses. 2015-03-19 22:02:10 +00:00
LowerExpectIntrinsic [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LowerInvoke Verifier: Call verifyModule() from llc and opt 2015-03-27 22:04:28 +00:00
LowerSwitch
Mem2Reg DebugInfo: Remove 'inlinedAt:' field from MDLocalVariable 2015-04-15 22:29:27 +00:00
MemCpyOpt [MemCpyOpt] Use the raw i8* dest when optimizing memset+memcpy. 2015-04-21 21:28:33 +00:00
MergeFunc
MetaRenamer
NaryReassociate Resurrect r235688 2015-04-24 04:22:39 +00:00
ObjCARC [opaque pointer type] Add textual IR support for explicit type parameter to the invoke instruction 2015-04-24 19:32:54 +00:00
PartiallyInlineLibCalls
PhaseOrdering [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
PlaceSafepoints Don't Place Entry Safepoints Before the llvm.frameescape() Intrinsic 2015-04-26 19:41:23 +00:00
PruneEH
Reassociate [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Reg2Mem
RewriteStatepointsForGC [RewriteStatepointsForGC] Exclude constant values from being considered live at a safepoint 2015-04-26 19:48:03 +00:00
SampleProfile [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Scalarizer DebugInfo: Fix bad debug info for compile units and types 2015-03-27 20:46:33 +00:00
ScalarRepl [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
SCCP [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
SeparateConstOffsetFromGEP/NVPTX [SeparateConstOffsetFromGEP] garbage-collect intermediate instructions 2015-04-21 19:53:18 +00:00
SimplifyCFG SimplifyCFG: Correctly handle switch lookup tables which fully cover the input type and use bit tests to check for holes 2015-04-24 20:57:56 +00:00
Sink
SLPVectorizer [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
SROA [ConstantFold] Don't fold ppc_fp128 <-> int bitcasts 2015-03-28 16:44:57 +00:00
StraightLineStrengthReduce [NVPTX] run SeparateConstOffsetFromGEP before SLSR 2015-04-23 20:00:04 +00:00
StripSymbols DebugInfo: Fix bad debug info for compile units and types 2015-03-27 20:46:33 +00:00
StructurizeCFG
TailCallElim
TailDup [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Util [SwitchLowering] Remove incoming values in the reverse order 2015-03-17 18:03:10 +00:00