[NFC] Remove dead code
authorGuillaume Chatelet <gchatelet@google.com>
Fri, 3 Feb 2023 16:05:45 +0000 (16:05 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Fri, 3 Feb 2023 16:06:11 +0000 (16:06 +0000)
llvm/lib/IR/ConstantFold.cpp

index 7af33a7..9a48f34 100644 (file)
@@ -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();
           }