1351278Sdim// WebAssemblyInstrRef.td - WebAssembly reference type codegen --*- tablegen -*- 2351278Sdim// 3351278Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4351278Sdim// See https://llvm.org/LICENSE.txt for license information. 5351278Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6351278Sdim// 7351278Sdim//===----------------------------------------------------------------------===// 8351278Sdim/// 9351278Sdim/// \file 10351278Sdim/// WebAssembly refence type operand codegen constructs. 11351278Sdim/// 12351278Sdim//===----------------------------------------------------------------------===// 13351278Sdim 14351278Sdimdefm SELECT_EXNREF : I<(outs EXNREF:$dst), 15351278Sdim (ins EXNREF:$lhs, EXNREF:$rhs, I32:$cond), 16351278Sdim (outs), (ins), 17351278Sdim [(set EXNREF:$dst, 18351278Sdim (select I32:$cond, EXNREF:$lhs, EXNREF:$rhs))], 19351278Sdim "exnref.select\t$dst, $lhs, $rhs, $cond", 20351278Sdim "exnref.select", 0x1b>; 21351278Sdim 22351278Sdimdef : Pat<(select (i32 (setne I32:$cond, 0)), EXNREF:$lhs, EXNREF:$rhs), 23351278Sdim (SELECT_EXNREF EXNREF:$lhs, EXNREF:$rhs, I32:$cond)>; 24351278Sdimdef : Pat<(select (i32 (seteq I32:$cond, 0)), EXNREF:$lhs, EXNREF:$rhs), 25351278Sdim (SELECT_EXNREF EXNREF:$rhs, EXNREF:$lhs, I32:$cond)>; 26