"&& TARGET_AVOID_FALSE_DEP_FOR_BMI && epilogue_completed
&& optimize_function_for_speed_p (cfun)
&& !reg_mentioned_p (operands[0], operands[1])"
- [(parallel
+ [(set (match_dup 0) (const_int 0))
+ (parallel
[(set (match_dup 0)
(clz:SWI48 (match_dup 1)))
(unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP)])]
- "ix86_expand_clear (operands[0]);"
+ ""
[(set_attr "prefix_rep" "1")
(set_attr "type" "bitmanip")
(set_attr "mode" "<MODE>")])
"&& TARGET_AVOID_FALSE_DEP_FOR_BMI && epilogue_completed
&& optimize_function_for_speed_p (cfun)
&& !reg_mentioned_p (operands[0], operands[1])"
- [(parallel
+ [(set (match_dup 0) (const_int 0))
+ (parallel
[(set (match_dup 0)
(unspec:SWI48 [(match_dup 1)] LT_ZCNT))
(unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP)])]
- "ix86_expand_clear (operands[0]);"
+ ""
[(set_attr "type" "<lt_zcnt_type>")
(set_attr "prefix_0f" "1")
(set_attr "prefix_rep" "1")
"&& TARGET_AVOID_FALSE_DEP_FOR_BMI && epilogue_completed
&& optimize_function_for_speed_p (cfun)
&& !reg_mentioned_p (operands[0], operands[1])"
- [(parallel
+ [(set (match_dup 0) (const_int 0))
+ (parallel
[(set (match_dup 0)
(popcount:SWI48 (match_dup 1)))
(unspec [(match_dup 0)] UNSPEC_INSN_FALSE_DEP)])]
- "ix86_expand_clear (operands[0]);"
+ ""
[(set_attr "prefix_rep" "1")
(set_attr "type" "bitmanip")
(set_attr "mode" "<MODE>")])
--- /dev/null
+/* PR target/124892 */
+/* { dg-do run { target { apxf && { lzcnt && { ! ia32 } } } } } */
+/* { dg-options "-O2 -frename-registers" } */
+
+[[gnu::noipa, gnu::target ("apxf"), gnu::target ("lzcnt")]] char
+foo (unsigned u)
+{
+ return __builtin_stdc_bit_ceil (u);
+}
+
+int
+main ()
+{
+ if (!__builtin_cpu_supports ("apxf"))
+ return 0;
+ if (!__builtin_cpu_supports ("lzcnt"))
+ return 0;
+ if (foo (7) != 8)
+ __builtin_abort ();
+}