1 // Floating-point clamp is designed to be implementable as max+min,
2 // so check to make sure that's what it's actually emitting.
4 // assembly-output: emit-asm
5 // compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
8 // CHECK-LABEL: clamp_demo:
10 pub fn clamp_demo(a: f32, x: f32, y: f32) -> f32 {
16 // CHECK-LABEL: clamp12_demo:
18 pub fn clamp12_demo(a: f32) -> f32 {
20 // CHECK-NEXT: maxss xmm1, xmm0
21 // CHECK-NEXT: movss xmm0
22 // CHECK-NEXT: minss xmm0, xmm1