Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
[llvm-complete.git] / lib / Target / WebAssembly / WebAssemblyInstrRef.td
blobafe89de60b361e5a28be1f4a50f49f1f44b2b944
1 // WebAssemblyInstrRef.td - WebAssembly reference type codegen --*- tablegen -*-
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// WebAssembly refence type operand codegen constructs.
11 ///
12 //===----------------------------------------------------------------------===//
14 defm SELECT_EXNREF : I<(outs EXNREF:$dst),
15                        (ins EXNREF:$lhs, EXNREF:$rhs, I32:$cond),
16                        (outs), (ins),
17                        [(set EXNREF:$dst,
18                          (select I32:$cond, EXNREF:$lhs, EXNREF:$rhs))],
19                        "exnref.select\t$dst, $lhs, $rhs, $cond",
20                        "exnref.select", 0x1b>;
22 def : Pat<(select (i32 (setne I32:$cond, 0)), EXNREF:$lhs, EXNREF:$rhs),
23           (SELECT_EXNREF EXNREF:$lhs, EXNREF:$rhs, I32:$cond)>;
24 def : Pat<(select (i32 (seteq I32:$cond, 0)), EXNREF:$lhs, EXNREF:$rhs),
25           (SELECT_EXNREF EXNREF:$rhs, EXNREF:$lhs, I32:$cond)>;