aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-02-03 16:05:45 +0000
committerGuillaume Chatelet <gchatelet@google.com>2023-02-03 16:06:11 +0000
commitcb1093b7718ae8594a7f4a7d6fb79a6965aea0f7 (patch)
tree56e60a5ef4395613105c831eff8f593fa7894dd3 /llvm/lib/IR/ConstantFold.cpp
parent1285172c21ef4867d9f895c0b2ab0f338c46e36f (diff)
downloadllvm-cb1093b7718ae8594a7f4a7d6fb79a6965aea0f7.zip
llvm-cb1093b7718ae8594a7f4a7d6fb79a6965aea0f7.tar.gz
llvm-cb1093b7718ae8594a7f4a7d6fb79a6965aea0f7.tar.bz2
[NFC] Remove dead code
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 7af33a7..9a48f34 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -1070,10 +1070,6 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1,
// appropriate defaults
if (isa<Function>(GV) && !DL.getFunctionPtrAlign())
GVAlign = Align(4);
- } else if (isa<Function>(GV)) {
- // Without a datalayout we have to assume the worst case: that the
- // function pointer isn't aligned at all.
- GVAlign = Align(1);
} else if (isa<GlobalVariable>(GV)) {
GVAlign = cast<GlobalVariable>(GV)->getAlign().valueOrOne();
}