mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Fix PR5471 by removing an instcombine xform. Some pieces of the code
generates store to undef and some generates store to null as the idiom for undefined behavior. Since simplifycfg zaps both, don't remove the undefined behavior in instcombine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89971 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -12096,12 +12096,6 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) {
|
||||
Value *Val = SI.getOperand(0);
|
||||
Value *Ptr = SI.getOperand(1);
|
||||
|
||||
if (isa<UndefValue>(Ptr)) { // store X, undef -> noop (even if volatile)
|
||||
EraseInstFromFunction(SI);
|
||||
++NumCombined;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// If the RHS is an alloca with a single use, zapify the store, making the
|
||||
// alloca dead.
|
||||
// If the RHS is an alloca with a two uses, the other one being a
|
||||
|
Reference in New Issue
Block a user