[Mlir-commits] [mlir] [mlir][SPIR-V] Add OpExpectKHR op (PR #195842)
Arseniy Obolenskiy
llvmlistbot at llvm.org
Tue May 5 06:42:20 PDT 2026
================
@@ -56,6 +56,58 @@ def SPIRV_KHRAssumeTrueOp : SPIRV_KhrVendorOp<"AssumeTrue", []> {
// -----
+def SPIRV_KHRExpectOp : SPIRV_KhrVendorOp<"Expect",
+ [Pure, AllTypesMatch<["value", "expectedValue", "result"]>]> {
+ let summary = "Provides a hint to the optimizer that the value is likely "
+ "to equal the expected value.";
+
+ let description = [{
+ Result Type must be a scalar or vector of integer type or Boolean type.
+
+ Value and Expected Value must be of Result Type. Result is the same as
+ Value.
+
+ <!-- End of AutoGen section -->
+
+ ```
+ integer-scalar-vector-type ::= integer-type |
+ `vector<` integer-literal `x` integer-type `>`
+ bool-scalar-vector-type ::= `i1` |
+ `vector<` integer-literal `x` `i1` `>`
+ expect-op ::= ssa-id `=` `spirv.KHR.Expect` ssa-use `,` ssa-use
+ `:` (integer-scalar-vector-type | bool-scalar-vector-type)
+ ```
----------------
aobolensk wrote:
Done, thanks
https://github.com/llvm/llvm-project/pull/195842
More information about the Mlir-commits
mailing list