Open
Description
I tried this code:
#![feature(float_minimum_maximum)]
fn main() {
let x = 1.0_f64;
let y = 2.0_f64;
assert_eq!(x.maximum(y), y);
}
Building for target arm-unknown-linux-gnueabihf.
I expected to see this happen: Compiles
Instead, this happened: Compiler error:
rustc: /checkout/src/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:973: void (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(SDNode *): Assertion `(TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) == TargetLowering::TypeLegal || Op.getOpcode() == ISD::TargetConstant || Op.getOpcode() == ISD::Register) && "Unexpected illegal type!"' failed.
Aborted
cc Tracking issue #91079, which has some discussion of whether or not this should be implemented using an intrinsic, which I was a little unclear about or whether this limitation is known.
Meta
rustc --version --verbose
:
rustc 1.89.0-nightly (414482f6a 2025-05-13)
binary: rustc
commit-hash: 414482f6a0d4e7290f614300581a0b55442552a3
commit-date: 2025-05-13
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.4