Skip to content
Snippets Groups Projects
Commit f28306b4 authored by liuhongt's avatar liuhongt
Browse files

Fix ICE in vectorizable_nonlinear_induction with bitfield.

 if (TREE_CODE (init_expr) == INTEGER_CST)
    init_expr = fold_convert (TREE_TYPE (vectype), init_expr);
  else
    gcc_assert (tree_nop_conversion_p (TREE_TYPE (vectype),
                                       TREE_TYPE (init_expr)));

and init_expr is a 24 bit integer type while vectype has 32bit components.

The "fix" is to bail out instead of asserting.

gcc/ChangeLog:

	PR tree-optimization/112496
	* tree-vect-loop.cc (vectorizable_nonlinear_induction): Return
	false when !tree_nop_conversion_p (TREE_TYPE (vectype),
	TREE_TYPE (init_expr)).

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pr112496.c: New test.
parent 4a70bfbf
No related branches found
No related tags found
Loading
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