[llvm] 6ff91d1 - BranchFolder: Assert on SSA functions

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 15:51:42 PDT 2022


Author: Matt Arsenault
Date: 2022-04-27T18:51:37-04:00
New Revision: 6ff91d17d66da46572e97f9a0b042182762cbe9e

URL: https://github.com/llvm/llvm-project/commit/6ff91d17d66da46572e97f9a0b042182762cbe9e
DIFF: https://github.com/llvm/llvm-project/commit/6ff91d17d66da46572e97f9a0b042182762cbe9e.diff

LOG: BranchFolder: Assert on SSA functions

We probably should have the opposite of getRequiredProperties for this

Added: 
    

Modified: 
    llvm/lib/CodeGen/BranchFolding.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 76f6a00b718e..5b5c743e3971 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -119,6 +119,8 @@ bool BranchFolderPass::runOnMachineFunction(MachineFunction &MF) {
   if (skipFunction(MF.getFunction()))
     return false;
 
+  assert(!MF.getProperties().hasProperty(MachineFunctionProperties::Property::IsSSA));
+
   TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>();
   // TailMerge can create jump into if branches that make CFG irreducible for
   // HW that requires structurized CFG.


        


More information about the llvm-commits mailing list