1// WebAssemblyInstrExceptRef.td-WebAssembly except_ref codegen --*- tablegen -*- 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9/// 10/// \file 11/// WebAssembly except_ref operand code-gen constructs. 12/// 13//===----------------------------------------------------------------------===// 14 15defm SELECT_EXCEPT_REF : I<(outs EXCEPT_REF:$dst), 16 (ins EXCEPT_REF:$lhs, EXCEPT_REF:$rhs, I32:$cond), 17 (outs), (ins), 18 [(set EXCEPT_REF:$dst, 19 (select I32:$cond, EXCEPT_REF:$lhs, 20 EXCEPT_REF:$rhs))], 21 "except_ref.select\t$dst, $lhs, $rhs, $cond", 22 "except_ref.select", 0x1b>; 23 24def : Pat<(select (i32 (setne I32:$cond, 0)), EXCEPT_REF:$lhs, EXCEPT_REF:$rhs), 25 (SELECT_EXCEPT_REF EXCEPT_REF:$lhs, EXCEPT_REF:$rhs, I32:$cond)>; 26def : Pat<(select (i32 (seteq I32:$cond, 0)), EXCEPT_REF:$lhs, EXCEPT_REF:$rhs), 27 (SELECT_EXCEPT_REF EXCEPT_REF:$rhs, EXCEPT_REF:$lhs, I32:$cond)>; 28