/* { dg-do compile } */ /* { dg-require-effective-target c++11 } */ /* { dg-options "-O2 -msse4.1 -mfpmath=sse" } */ typedef float __attribute__( ( vector_size( 16 ) ) ) float32x4_t; template V1 vmax(V1 a, V1 b) { return (a>b) ? a : b; } template V1 vmin(V1 a, V1 b) { return (a Float bart(Float a) { constexpr Float zero{0.f}; constexpr Float it = zero+4.f; constexpr Float zt = zero-3.f; return vmin(vmax(a,zt),it); } float bar(float a) { return bart(a); } float32x4_t bar(float32x4_t a) { return bart(a); } /* { dg-final { scan-assembler-times "min" 4 } } */ /* { dg-final { scan-assembler-times "max" 4 } } */