(&mut self, val: Self::Value)
| 995 | .with_type(ty) |
| 996 | } |
| 997 | fn not(&mut self, val: Self::Value) -> Self::Value { |
| 998 | match self.lookup_type(val.ty) { |
| 999 | SpirvType::Integer(_, _) => self.emit().not(val.ty, None, val.def(self)), |
| 1000 | SpirvType::Bool => { |
| 1001 | let true_ = self.constant_bool(self.span(), true); |
| 1002 | // intel-compute-runtime doesn't like OpLogicalNot |
| 1003 | self.emit() |
| 1004 | .logical_not_equal(val.ty, None, val.def(self), true_.def(self)) |
| 1005 | } |
| 1006 | o => self.fatal(&format!( |
| 1007 | "not() not implemented for type {}", |
| 1008 | o.debug(val.ty, self) |
| 1009 | )), |
| 1010 | } |
| 1011 | .unwrap() |
| 1012 | .with_type(val.ty) |
| 1013 | } |
| 1014 | |
| 1015 | fn checked_binop( |
| 1016 | &mut self, |
nothing calls this directly
no test coverage detected