Skip to content
Snippets Groups Projects
Commit 9f35d8cd authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

slp: Fix handling of IFN_CLZ/CTZ [PR112536]

We ICE on the following testcase now that IFN_C[LT]Z calls can have one or
two arguments (where 2 mean it is well defined at zero).
The following patch makes us create child node only for the first argument
and compatible_calls_p ensures the other argument is the same, which
at least according to the testcase seems sufficient because of vect
patterns.

2023-11-16  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/112536
	* tree-vect-slp.cc (arg0_map): New variable.
	(vect_get_operand_map): For IFN_CLZ or IFN_CTZ, return arg0_map.

	* gcc.dg/pr112536.c: New test.
parent 31bf21c7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment