Minor fixes

This commit is contained in:
Andrzej Janik
2025-07-23 22:47:11 +00:00
parent 0fc1028279
commit 7887237ff0
2 changed files with 3 additions and 4 deletions

View File

@ -1963,7 +1963,7 @@ fn get_modes<T: ast::Operand>(inst: &ast::Instruction<T>) -> InstructionModes {
ast::Instruction::Rcp { data, .. } | ast::Instruction::Sqrt { data, .. } => { ast::Instruction::Rcp { data, .. } | ast::Instruction::Sqrt { data, .. } => {
InstructionModes::from_rtz_special(*data) InstructionModes::from_rtz_special(*data)
} }
| ast::Instruction::Rsqrt { data, .. } ast::Instruction::Rsqrt { data, .. }
| ast::Instruction::Ex2 { data, .. } => { | ast::Instruction::Ex2 { data, .. } => {
let data = ast::RcpData { let data = ast::RcpData {
type_: data.type_, type_: data.type_,
@ -1972,7 +1972,7 @@ fn get_modes<T: ast::Operand>(inst: &ast::Instruction<T>) -> InstructionModes {
}; };
InstructionModes::from_rtz_special(data) InstructionModes::from_rtz_special(data)
}, },
| ast::Instruction::Lg2 { data, .. } => { ast::Instruction::Lg2 { data, .. } => {
let data = ast::RcpData { let data = ast::RcpData {
type_: ast::ScalarType::F32, type_: ast::ScalarType::F32,
flush_to_zero: Some(data.flush_to_zero), flush_to_zero: Some(data.flush_to_zero),

View File

@ -27,7 +27,6 @@
use std::array::TryFromSliceError; use std::array::TryFromSliceError;
use std::convert::TryInto; use std::convert::TryInto;
use std::ffi::{CStr, NulError}; use std::ffi::{CStr, NulError};
use std::ops::Deref;
use std::{i8, ptr, u64}; use std::{i8, ptr, u64};
use super::*; use super::*;
@ -2673,7 +2672,7 @@ impl<'a> MethodEmitContext<'a> {
Ok(()) Ok(())
} }
// TOOD: revisit this on gfx1250 which has native tanh support // TODO: revisit this on gfx1250 which has native tanh support
fn emit_tanh( fn emit_tanh(
&mut self, &mut self,
data: ast::ScalarType, data: ast::ScalarType,