diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index f6d3022..372a669 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -7126,20 +7126,6 @@ static bool passingValueIsAlwaysUndefined(Value *V, Instruction *I, bool PtrValu return passingValueIsAlwaysUndefined(V, GEP, PtrValueMayBeModified); } - // Look through return. - if (ReturnInst *Ret = dyn_cast<ReturnInst>(Use)) { - bool HasNoUndefAttr = - Ret->getFunction()->hasRetAttribute(Attribute::NoUndef); - // Return undefined to a noundef return value is undefined. - if (isa<UndefValue>(C) && HasNoUndefAttr) - return true; - // Return null to a nonnull+noundef return value is undefined. - if (C->isNullValue() && HasNoUndefAttr && - Ret->getFunction()->hasRetAttribute(Attribute::NonNull)) { - return true; - } - } - // Look through bitcasts. if (BitCastInst *BC = dyn_cast<BitCastInst>(Use)) return passingValueIsAlwaysUndefined(V, BC, PtrValueMayBeModified); |