This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question on tree-ssa-loop-ivopts.c:constant_multiple_of
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc at gcc dot gnu dot org
- Date: Wed, 29 Jun 05 17:44:44 EDT
- Subject: Question on tree-ssa-loop-ivopts.c:constant_multiple_of
Isn't it the case that *any* conversion can be stripped for the purpose
of this routine? I get an ICE compiling the Ada RTS a-strfix.adb because
of that. The following seems to fix it, but is it right?
*** tree-ssa-loop-ivopts.c 26 Jun 2005 21:21:32 -0000 2.82
--- tree-ssa-loop-ivopts.c 29 Jun 2005 21:38:29 -0000
*************** constant_multiple_of (tree type, tree to
*** 2594,2599 ****
bool negate;
! STRIP_NOPS (top);
! STRIP_NOPS (bot);
if (operand_equal_p (top, bot, 0))
--- 2594,2603 ----
bool negate;
! /* For determining the condition above, we can ignore all conversions, not
! just those that don't change the mode, so can't use STRIP_NOPS here. */
! while (TREE_CODE (top) == NOP_EXPR || TREE_CODE (top) == CONVERT_EXPR)
! top = TREE_OPERAND (top, 0);
! while (TREE_CODE (bot) == NOP_EXPR || TREE_CODE (bot) == CONVERT_EXPR)
! bot = TREE_OPERAND (bot, 0);
if (operand_equal_p (top, bot, 0))