llvm-6502/test/Transforms
Philip Reames b835f3446f Remove dead zero store to calloc initialized memory
Optimize the following IR:

%1 = tail call noalias i8* @calloc(i64 1, i64 4)
%2 = bitcast i8* %1 to i32*
; This store is dead and should be removed
store i32 0, i32* %2, align 4

Memory returned by calloc is guaranteed to be zero initialized. If the value being stored is the constant zero (and the store is not otherwise observable across threads), we can delete the store.  If the store is to an out of bounds address, it is undefined and thus also removable.

Reviewed By: nicholas

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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214897 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-05 17:48:20 +00:00
..
ADCE
AddDiscriminators
ArgumentPromotion ArgPromo+DebugInfo: Handle updating debug info over multiple applications of argument promotion. 2014-07-23 22:09:29 +00:00
AtomicExpandLoadLinked/ARM
BBVectorize
BranchFolding
CodeExtractor
CodeGenPrepare CodeGenPrep: fall back to MVT::Other if instruction's type isn't an EVT. 2014-07-29 10:20:22 +00:00
ConstantHoisting
ConstantMerge
ConstProp
CorrelatedValuePropagation
DeadArgElim
DeadStoreElimination Remove dead zero store to calloc initialized memory 2014-08-05 17:48:20 +00:00
DebugIR
EarlyCSE
FunctionAttrs
GCOVProfiling
GlobalDCE Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
GlobalOpt Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
GVN Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
IndVarSimplify
Inline Convert noalias parameter attributes into noalias metadata during inlining 2014-07-25 15:50:08 +00:00
InstCombine This patch implements transform for pattern "(A & ~B) ^ (~A) -> ~(A & B)". 2014-08-01 05:07:20 +00:00
InstMerge MergedLoadStoreMotion pass 2014-07-18 19:13:09 +00:00
InstSimplify InstSimplify: Simplify (X - (0 - Y)) if the second sub is NUW 2014-07-31 04:49:18 +00:00
Internalize Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
IPConstantProp
JumpThreading
LCSSA
LICM Make Value::isDereferenceablePointer handle offsets to pointer types with dereferenceable attributes 2014-07-19 03:25:16 +00:00
LoadCombine
LoopDeletion
LoopIdiom R600: Implement TTI:getPopcntSupport 2014-07-18 06:07:13 +00:00
LoopReroll
LoopRotate
LoopSimplify
LoopStrengthReduce
LoopUnroll After unrolling a loop with llvm.loop.unroll.count metadata (unroll factor 2014-07-24 22:36:40 +00:00
LoopUnswitch
LoopVectorize Add diagnostics to the vectorizer cost model. 2014-08-02 00:14:03 +00:00
LowerAtomic
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt
MergeFunc MergeFunc patch from Björn Steinbrink. 2014-07-15 10:46:51 +00:00
MetaRenamer Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
ObjCARC
PartiallyInlineLibCalls PartiallyInlineLibCalls: Check sqrt result type before transforming it. 2014-08-01 23:21:21 +00:00
PhaseOrdering
PruneEH
Reassociate
Reg2Mem
SampleProfile
Scalarizer
ScalarRepl
SCCP
SeparateConstOffsetFromGEP/NVPTX Partially revert r210444 due to performance regression 2014-07-16 23:25:00 +00:00
SimplifyCFG [SimplifyCFG] fix accessing deleted PHINodes in switch-to-table conversion. 2014-08-02 23:41:54 +00:00
Sink
SLPVectorizer Teach the SLP Vectorizer that keeping some values live over a callsite can have a cost. 2014-08-05 12:30:34 +00:00
SROA
StripSymbols
StructurizeCFG
TailCallElim We may visit a call that uses an alloca multiple times in callUsesLocalStack, sometimes with IsNocapture true and sometimes with IsNocapture false. We accidentally skipped work we needed to do in the IsNocapture=false case if we were called with IsNocapture=true the first time. Fixes PR20405! 2014-07-23 06:24:49 +00:00
TailDup