From d056c0c71f954b01e2d4475b8d75ec32e842fc00 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Mon, 4 May 2020 10:37:38 -0700 Subject: [PATCH] Remove unnecessary check for inalloca in IPConstantPropagation Summary: This was added in https://reviews.llvm.org/D2449, but I'm not sure it's necessary since an inalloca value is never a Constant (should be an AllocaInst). Reviewers: hans, rnk Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79350 --- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp index a2d7bcc..8d05a72 100644 --- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -129,7 +129,7 @@ static bool PropagateConstantsIntoArguments(Function &F) { for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI) { // Do we have a constant argument? if (ArgumentConstants[i].getInt() || AI->use_empty() || - AI->hasInAllocaAttr() || (AI->hasByValAttr() && !F.onlyReadsMemory())) + (AI->hasByValAttr() && !F.onlyReadsMemory())) continue; Value *V = ArgumentConstants[i].getPointer(); -- 2.7.4