From 5e035185e16bef9c579f1ccbc893eab8d4ed1beb Mon Sep 17 00:00:00 2001 From: mlevesquedion Date: Mon, 8 Apr 2024 11:26:20 -0700 Subject: [PATCH] Mark recursively speculatable ops as such (#2175) This includes the regioned ops case, if and while. --- stablehlo/dialect/StablehloOps.td | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stablehlo/dialect/StablehloOps.td b/stablehlo/dialect/StablehloOps.td index db6e99a2387..bf2581d08f7 100644 --- a/stablehlo/dialect/StablehloOps.td +++ b/stablehlo/dialect/StablehloOps.td @@ -1197,6 +1197,7 @@ def StableHLO_AfterAllOp : StableHLO_Op<"after_all", [Pure, // conditional use of kConditional HLO. def StableHLO_IfOp: StableHLO_Op<"if", [ RecursiveMemoryEffects, + RecursivelySpeculatable, SingleBlockImplicitTerminator<"ReturnOp">, DeclareOpInterfaceMethods]> { let summary = "If operation"; @@ -1230,6 +1231,7 @@ def StableHLO_IfOp: StableHLO_Op<"if", [ // conditional use of kConditional HLO. def StableHLO_CaseOp: StableHLO_Op<"case", [ RecursiveMemoryEffects, + RecursivelySpeculatable, SingleBlockImplicitTerminator<"ReturnOp">, DeclareOpInterfaceMethods /*case_c4*/ ]> { @@ -1263,6 +1265,7 @@ def StableHLO_CaseOp: StableHLO_Op<"case", [ def StableHLO_WhileOp: StableHLO_Op<"while", [ RecursiveMemoryEffects, + RecursivelySpeculatable, SingleBlockImplicitTerminator<"ReturnOp">, DeclareOpInterfaceMethods /*while_c3*/, OpAsmOpInterface