(&mut self, lhs: Self::Value, rhs: Self::Value)
| 937 | simple_uni_op! {fneg, f_negate} |
| 938 | |
| 939 | fn and(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value { |
| 940 | assert_ty_eq!(self, lhs.ty, rhs.ty); |
| 941 | let ty = lhs.ty; |
| 942 | match self.lookup_type(ty) { |
| 943 | SpirvType::Integer(_, _) => { |
| 944 | self.emit() |
| 945 | .bitwise_and(ty, None, lhs.def(self), rhs.def(self)) |
| 946 | } |
| 947 | SpirvType::Bool => self |
| 948 | .emit() |
| 949 | .logical_and(ty, None, lhs.def(self), rhs.def(self)), |
| 950 | o => self.fatal(&format!( |
| 951 | "and() not implemented for type {}", |
| 952 | o.debug(ty, self) |
| 953 | )), |
| 954 | } |
| 955 | .unwrap() |
| 956 | .with_type(ty) |
| 957 | } |
| 958 | fn or(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value { |
| 959 | assert_ty_eq!(self, lhs.ty, rhs.ty); |
| 960 | let ty = lhs.ty; |
no test coverage detected