BranchFolder: Assert on SSA functions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 25 Apr 2022 12:12:32 +0000 (08:12 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Wed, 27 Apr 2022 22:51:37 +0000 (18:51 -0400)
We probably should have the opposite of getRequiredProperties for this

llvm/lib/CodeGen/BranchFolding.cpp

index 76f6a00..5b5c743 100644 (file)
@@ -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.