/* { dg-do compile } */ /* Use -Wno-attributes to suppress the possible warning on always_inline. */ /* { dg-options "-O2 -mdejagnu-cpu=power9 -Wno-attributes" } */ /* Verify it doesn't emit any error messages. */ #include #define HWY_PRAGMA(tokens) _Pragma (#tokens) #define HWY_PUSH_ATTRIBUTES(targets_str) HWY_PRAGMA (GCC target targets_str) __attribute__ ((always_inline)) void PreventElision () { asm(""); } #define HWY_BEFORE_NAMESPACE() HWY_PUSH_ATTRIBUTES (",cpu=power10") HWY_BEFORE_NAMESPACE () namespace detail { template struct CappedTagChecker { }; } template using CappedTag = detail::CappedTagChecker; template struct ForeachCappedR { static void Do (size_t, size_t) { CappedTag d; Test () (int(), d); } }; template struct ForPartialVectors { template void operator() (T) { ForeachCappedR::Do (1, 1); } }; struct TestFloorLog2 { template void operator() (T, DF) { PreventElision (); } }; void TestAllFloorLog2 () { ForPartialVectors () (float()); }