public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aleksandar Rakic <Aleksandar.Rakic@Syrmia.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Jovan Dmitrovic <Jovan.Dmitrovic@Syrmia.com>,
	"richard.guenther@gmail.com" <richard.guenther@gmail.com>,
	Djordje Todorovic <Djordje.Todorovic@syrmia.com>,
	"jeffreyalaw@gmail.com" <jeffreyalaw@gmail.com>,
	Uros Beric <Uros.Beric@Syrmia.com>
Subject: Re: [PATCH 1/2] ivopts: Revert computation of address cost complexity.
Date: Mon, 18 Mar 2024 20:27:23 +0000	[thread overview]
Message-ID: <AM0PR03MB46111886C381E0CF7DB0459EFC2D2@AM0PR03MB4611.eurprd03.prod.outlook.com> (raw)

From dbf49f2872efcc14d2ea41eb7d616498dca9789f Mon Sep 17 00:00:00 2001
From: Aleksandar Rakić <Aleksandar.Rakic@Syrmia.com>
Date: Tue, 5 Mar 2024 11:55:01 +0100
Subject: [PATCH] ivopts: Fixed bug 109429

This patch modifies the order of the complexity calculation. By fixing the
complexities, the candidate selection is also fixed, which leads to the smaller
code size.

This patch also fixes the complexity if the variable is present in
the address expression, similarly to the variable 'var_present' in the
commit c2b64ce.

It also differentiates the adding of the autoinc_cost and the address
cost (acost) to the cost, similarly to the commit c2b64ce.

It also contains the C test and the script that generates the
assembly file and the output of the compiler. The assembly code
obtained after the modification of the file tree-ssa-loop-ivopts.cc is
smaller in size than the assembly code obtained before that. The output
of the compiler shows the difference in complexities for the function dgefa
for the loop 3 for the group 1.

This patch is available on the gcc fork on the following address:
https://github.com/rakicaleksandar1999/gcc/tree/bug_109429.

The description of the bug 109429 is on the following address:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109429.

gcc/ChangeLog:

    * tree-ssa-loop-ivopts.cc (get_address_cost): Fixed the
    complexities calculation.

gcc/testsuite/ChangeLog:

    * after.s: The assembly file obtained by compiling the fp_foo.c
    file after modification of the tree-ssa-loop-ivopts.cc file.
    * after.txt: The compiler-generated output obtained by compiling
    the fp_foo.c file after modification of the
    tree-ssa-loop-ivopts.cc file.
    * before.s: The assembly file obtained by compiling the fp_foo.c
    file before modification of the tree-ssa-loop-ivopts.cc file.
    * before.txt: The compiler-generated output obtained by compiling
    the fp_foo.c file before modification of the
    tree-ssa-loop-ivopts.cc file.
    * fp_foo.c: The C test.
    * test_script.sh: The script used for compiling the fp_foo.c file.

Signed-off-by: Aleksandar Rakić <Aleksandar.Rakic@Syrmia.com>
---
 gcc/testsuite/after.s        |  148 ++
 gcc/testsuite/after.txt      | 2792 ++++++++++++++++++++++++++++++++++
 gcc/testsuite/before.s       |  152 ++
 gcc/testsuite/before.txt     | 2694 ++++++++++++++++++++++++++++++++
 gcc/testsuite/fp_foo.c       |   19 +
 gcc/testsuite/test_script.sh |   10 +
 gcc/tree-ssa-loop-ivopts.cc  |   75 +-
 7 files changed, 5853 insertions(+), 37 deletions(-)
 create mode 100644 gcc/testsuite/after.s
 create mode 100644 gcc/testsuite/after.txt
 create mode 100644 gcc/testsuite/before.s
 create mode 100644 gcc/testsuite/before.txt
 create mode 100644 gcc/testsuite/fp_foo.c
 create mode 100644 gcc/testsuite/test_script.sh

diff --git a/gcc/testsuite/after.s b/gcc/testsuite/after.s
new file mode 100644
index 00000000000..a32bb8b3614
--- /dev/null
+++ b/gcc/testsuite/after.s
@@ -0,0 +1,148 @@
+	.file	1 "fp_foo.c"
+	.section .mdebug.abi64
+	.previous
+	.nan	2008
+	.module	fp=64
+	.module	oddspreg
+	.module	arch=mips64r6
+	.abicalls
+	.text
+	.align	2
+	.align	3
+	.globl	daxpy
+	.set	nomips16
+	.set	nomicromips
+	.ent	daxpy
+	.type	daxpy, @function
+daxpy:
+	.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0
+	.mask	0x00000000,0
+	.fmask	0x00000000,0
+	.set	noreorder
+	.set	nomacro
+	blezc	$6,.L7
+	dlsa	$6,$6,$4,2
+	.align	3
+.L3:
+	lwc1	$f1,0($5)
+	daddiu	$4,$4,4
+	lwc1	$f0,-4($4)
+	daddiu	$5,$5,4
+	maddf.s	$f0,$f1,$f15
+	bne	$4,$6,.L3
+	swc1	$f0,-4($4)
+
+.L7:
+	jrc	$31
+	.set	macro
+	.set	reorder
+	.end	daxpy
+	.size	daxpy, .-daxpy
+	.align	2
+	.align	3
+	.globl	dgefa
+	.set	nomips16
+	.set	nomicromips
+	.ent	dgefa
+	.type	dgefa, @function
+dgefa:
+	.frame	$sp,48,$31		# vars= 0, regs= 5/0, args= 0, gp= 0
+	.mask	0x100f0000,-8
+	.fmask	0x00000000,0
+	.set	noreorder
+	.set	nomacro
+	li	$2,1			# 0x1
+	bgec	$2,$6,.L23
+	daddiu	$sp,$sp,-48
+	addiu	$14,$6,-1
+	move	$10,$6
+	sd	$19,32($sp)
+	sd	$18,24($sp)
+	move	$11,$4
+	sd	$17,16($sp)
+	move	$17,$5
+	sd	$16,8($sp)
+	dlsa	$9,$7,$4,2
+	addiu	$19,$5,1
+	dsll	$12,$5,2
+	move	$25,$5
+	move	$24,$0
+	move	$13,$0
+	move	$15,$0
+	move	$18,$14
+	.align	3
+.L11:
+	addiu	$7,$15,1
+	addiu	$16,$15,1
+	daddiu	$13,$13,1
+	move	$15,$7
+	bgec	$7,$10,.L15
+	daddiu	$8,$24,1
+	daddu	$6,$13,$25
+	dlsa	$8,$8,$11,2
+	dsll	$6,$6,2
+	move	$5,$14
+	.align	3
+.L14:
+	daddu	$2,$9,$6
+	daddu	$4,$11,$6
+	lwc1	$f2,-4($2)
+	move	$3,$0
+	move	$2,$8
+	.align	3
+.L13:
+	lwc1	$f1,0($4)
+	daddiu	$2,$2,4
+	lwc1	$f0,-4($2)
+	addiu	$3,$3,1
+	daddiu	$4,$4,4
+	maddf.s	$f0,$f2,$f1
+	swc1	$f0,-4($2)
+	bltc	$3,$5,.L13
+	addiu	$7,$7,1
+	bne	$10,$7,.L14
+	daddu	$6,$6,$12
+
+.L15:
+	addiu	$14,$14,-1
+	daddiu	$9,$9,-4
+	addu	$24,$24,$19
+	bne	$18,$16,.L11
+	addu	$25,$17,$25
+
+	ld	$19,32($sp)
+	ld	$18,24($sp)
+	ld	$17,16($sp)
+	ld	$16,8($sp)
+	jr	$31
+	daddiu	$sp,$sp,48
+
+.L23:
+	jrc	$31
+	.set	macro
+	.set	reorder
+	.end	dgefa
+	.size	dgefa, .-dgefa
+	.section	.text.startup,"ax",@progbits
+	.align	2
+	.align	3
+	.globl	main
+	.set	nomips16
+	.set	nomicromips
+	.ent	main
+	.type	main, @function
+main:
+	.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0
+	.mask	0x00000000,0
+	.fmask	0x00000000,0
+	.set	noreorder
+	.set	nomacro
+	jr	$31
+	move	$2,$0
+
+	.set	macro
+	.set	reorder
+	.end	main
+	.size	main, .-main
+	.ident	"GCC: (GNU) 14.0.1 20240214 (experimental)"
+	.section	.note.GNU-stack,"",@progbits
diff --git a/gcc/testsuite/after.txt b/gcc/testsuite/after.txt
new file mode 100644
index 00000000000..772f92d2b20
--- /dev/null
+++ b/gcc/testsuite/after.txt
@@ -0,0 +1,2792 @@
+tree_ssa_iv_optimize
+;;
+;; Loop 1
+;;  header 3, latch 6
+;;  depth 1, outer 0, finite_p
+;;  niter (unsigned int) n_12(D) + 4294967295
+;;  upper_bound 2147483646
+;;  likely_upper_bound 2147483646
+;;  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:105119324 (estimated locally, freq 0.8900)
+;;  nodes: 3 6
+Processing loop 1 at fp_foo.c:3
+  single exit 3 -> 7, exit condition if (n_12(D) > i_17)
+
+
+
+Loops in function: daxpy
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_5 bb_4 })
+  {
+    <bb 2> [local count: 118111600]:
+    if (n_12(D) > 0)
+      goto <bb 5>; [89.00%]
+    else
+      goto <bb 4>; [11.00%]
+
+  }
+  bb_5 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 5> [local count: 105119324]:
+
+  }
+  bb_7 (preds = {bb_3 }, succs = {bb_4 })
+  {
+    <bb 7> [local count: 105119324]:
+    # .MEM_22 = PHI <.MEM_16(3)>
+
+  }
+  bb_4 (preds = {bb_2 bb_7 }, succs = {bb_1 })
+  {
+    <bb 4> [local count: 118111600]:
+    # .MEM_29 = PHI <.MEM_11(D)(2), .MEM_22(7)>
+    # VUSE <.MEM_29>
+    return;
+
+  }
+  loop_1 (header = 3, latch = 6, finite_p
+  niter (unsigned int) n_12(D) + 4294967295
+  upper_bound 2147483646
+  likely_upper_bound 2147483646
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:105119324 (estimated locally, freq 0.8900))
+  {
+    bb_3 (preds = {bb_6 bb_5 }, succs = {bb_6 bb_7 })
+    {
+      <bb 3> [local count: 955630224]:
+      # i_20 = PHI <i_17(6), 0(5)>
+      # .MEM_21 = PHI <.MEM_16(6), .MEM_11(D)(5)>
+      _1 = (long unsigned int) i_20;
+      _2 = _1 * 4;
+      _3 = vector1_13(D) + _2;
+      # VUSE <.MEM_21>
+      _4 = *_3;
+      _5 = vector2_14(D) + _2;
+      # VUSE <.MEM_21>
+      _6 = *_5;
+      _7 = _6 * fp_const_15(D);
+      _8 = _4 + _7;
+      # .MEM_16 = VDEF <.MEM_21>
+      *_3 = _8;
+      i_17 = i_20 + 1;
+      if (n_12(D) > i_17)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 7>; [11.00%]
+
+    }
+    bb_6 (preds = {bb_3 }, succs = {bb_3 })
+    {
+      <bb 6> [local count: 850510900]:
+      goto <bb 3>; [100.00%]
+
+    }
+  }
+}
+Analyzing # of iterations of loop 1
+  exit condition [1, + , 1](no_overflow) < n_12(D)
+  bounds on difference of bases: 0 ... 2147483646
+  result:
+    # of iterations (unsigned int) n_12(D) + 4294967295, bounded by 2147483646
+  number of iterations (unsigned int) n_12(D) + 4294967295
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_1
+  Type:	long unsigned int
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_2
+  Type:	long unsigned int
+  Base:	0
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_3
+  Type:	float *
+  Base:	vector1_13(D)
+  Step:	4
+  Object:	(void *) vector1_13(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_5
+  Type:	float *
+  Base:	vector2_14(D)
+  Step:	4
+  Object:	(void *) vector2_14(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_17
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_20
+  Type:	int
+  Base:	0
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+
+<IV Groups>:
+Group 0:
+  Type:	REFERENCE ADDRESS
+  Use 0.0:
+    At stmt:	_4 = *_3;
+    At pos:	*_3
+    IV struct:
+      Type:	float *
+      Base:	vector1_13(D)
+      Step:	4
+      Object:	(void *) vector1_13(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+  Use 0.1:
+    At stmt:	*_3 = _8;
+    At pos:	*_3
+    IV struct:
+      Type:	float *
+      Base:	vector1_13(D)
+      Step:	4
+      Object:	(void *) vector1_13(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 1:
+  Type:	REFERENCE ADDRESS
+  Use 1.0:
+    At stmt:	_6 = *_5;
+    At pos:	*_5
+    IV struct:
+      Type:	float *
+      Base:	vector2_14(D)
+      Step:	4
+      Object:	(void *) vector2_14(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 2:
+  Type:	COMPARE
+  Use 2.0:
+    At stmt:	if (n_12(D) > i_17)
+    At pos:	i_17
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.6
+  Var after: ivtmp.6
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.7
+  Var after: ivtmp.7
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.8
+  Var after: ivtmp.8
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.9
+  Var after: ivtmp.9
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector1_13(D)
+    Step:	4
+    Object:	(void *) vector1_13(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.10
+  Var after: ivtmp.10
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector2_14(D)
+    Step:	4
+    Object:	(void *) vector2_14(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.11
+  Var after: ivtmp.11
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 7:
+  Var befor: ivtmp.12
+  Var after: ivtmp.12
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	0
+    Step:	4
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+
+<Important Candidates>:	 0, 1, 2, 3,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3, 4, 7
+  Group 1:	0, 1, 2, 3, 5, 7
+  Group 2:	0, 1, 2, 3, 6
+
+<Candidate Costs>:
+  cand	cost
+force_expr_to_var_cost size costs:
+  integer 0
+  symbol 5
+  address 5
+  other 24
+
+force_expr_to_var_cost speed costs:
+  integer 0
+  symbol 5
+  address 5
+  other 24
+
+  0	5
+  1	5
+  2	5
+  3	4
+  4	5
+  5	5
+  6	5
+  7	5
+
+
+<Invariant Vars>:
+Inv 4:	n_12(D)	(eliminable)
+Inv 1:	vector1_13(D)	(eliminable)
+Inv 2:	vector2_14(D)	(eliminable)
+Inv 3:	fp_const_15(D)	(eliminable)
+
+<Invariant Expressions>:
+inv_expr 1: 	(unsigned long) n_12(D) * 4 + (unsigned long) vector1_13(D)
+inv_expr 2: 	(unsigned long) n_12(D) * 4 + (unsigned long) vector2_14(D)
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	18	2	NIL;	1
+  2	18	4	NIL;	1
+  4	2	0	NIL;	NIL;
+  7	10	2	NIL;	1
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	9	1	NIL;	2
+  2	9	2	NIL;	2
+  5	1	0	NIL;	NIL;
+  7	5	1	NIL;	2
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	4
+  1	0	0	NIL;	4
+  2	1	0	NIL;	4
+  3	0	0	NIL;	4
+  4	1	0	1;	NIL;
+  5	1	0	2;	NIL;
+  6	0	0	NIL;	4
+  7	1	0	NIL;	4
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 0
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	38
+  20	40
+  21	42
+  22	44
+  23	115
+  24	120
+  25	125
+  26	130
+  27	179
+  28	228
+  29	277
+  30	326
+  31	375
+  32	424
+  33	473
+  34	522
+  35	571
+  36	620
+  37	669
+  38	718
+  39	767
+  40	816
+  41	865
+  42	914
+  43	963
+  44	1012
+  45	1061
+  46	1110
+  47	1159
+  48	1208
+  49	1257
+  50	1306
+  51	1355
+  52	1404
+
+Initial set of candidates:
+  cost: 37 (complexity 3)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 27 (complexity 3)
+  candidates: 1
+   group:0 --> iv_cand:1, cost=(18,2)
+   group:1 --> iv_cand:1, cost=(9,1)
+   group:2 --> iv_cand:1, cost=(0,0)
+  invariant variables: 1, 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 26 (complexity 3)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 16 (complexity 3)
+  candidates: 7
+   group:0 --> iv_cand:7, cost=(10,2)
+   group:1 --> iv_cand:7, cost=(5,1)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 1, 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 24 (complexity 1)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 8 (complexity 1)
+  candidates: 4, 7
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:7, cost=(5,1)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 19 (complexity 0)
+  reg_cost: 5
+  cand_cost: 10
+  cand_group_cost: 4 (complexity 0)
+  candidates: 4, 5
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:5, cost=(1,0)
+   group:2 --> iv_cand:4, cost=(1,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Initial set of candidates:
+  cost: 26 (complexity 3)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 16 (complexity 3)
+  candidates: 7
+   group:0 --> iv_cand:7, cost=(10,2)
+   group:1 --> iv_cand:7, cost=(5,1)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 1, 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 24 (complexity 1)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 8 (complexity 1)
+  candidates: 4, 7
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:7, cost=(5,1)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 19 (complexity 0)
+  reg_cost: 5
+  cand_cost: 10
+  cand_group_cost: 4 (complexity 0)
+  candidates: 4, 5
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:5, cost=(1,0)
+   group:2 --> iv_cand:4, cost=(1,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Original cost 19 (complexity 0)
+
+Final cost 19 (complexity 0)
+
+Selected IV set for loop 1 at fp_foo.c:3, 10 avg niters, 2 IVs:
+Candidate 4:
+  Var befor: ivtmp.9_28
+  Var after: ivtmp.9_27
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector1_13(D)
+    Step:	4
+    Object:	(void *) vector1_13(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.10_25
+  Var after: ivtmp.10_24
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector2_14(D)
+    Step:	4
+    Object:	(void *) vector2_14(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+Replacing exit test: if (n_12(D) > i_17)
+tree_ssa_iv_optimize
+;;
+;; Loop 3
+;;  header 8, latch 13
+;;  depth 3, outer 2, finite_p
+;;  niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+;;  upper_bound 2147483645
+;;  likely_upper_bound 2147483645
+;;  iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628)
+;;  nodes: 8 13
+Processing loop 3 at fp_foo.c:3
+  single exit 8 -> 9, exit condition if (i_40 < _87)
+
+
+
+Loops in function: dgefa
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_10 bb_14 })
+  {
+    <bb 2> [local count: 1804255]:
+    _45 = n_23(D) + -1;
+    if (n_23(D) > 1)
+      goto <bb 10>; [89.00%]
+    else
+      goto <bb 14>; [11.00%]
+
+  }
+  bb_14 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 14> [local count: 198468]:
+
+  }
+  bb_3 (preds = {bb_14 bb_16 }, succs = {bb_1 })
+  {
+    <bb 3> [local count: 1804255]:
+    # .MEM_88 = PHI <.MEM_22(D)(14), .MEM_53(16)>
+    # VUSE <.MEM_88>
+    return;
+
+  }
+  bb_10 (preds = {bb_2 }, succs = {bb_4 })
+  {
+    <bb 10> [local count: 1605787]:
+
+  }
+  bb_16 (preds = {bb_5 }, succs = {bb_3 })
+  {
+    <bb 16> [local count: 1605787]:
+    # .MEM_53 = PHI <.MEM_89(5)>
+    goto <bb 3>; [100.00%]
+
+  }
+  loop_1 (header = 4, latch = 11, finite_p
+  niter (unsigned int) n_23(D) + 4294967294
+  upper_bound 2147483645
+  likely_upper_bound 2147483645
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900))
+  {
+    bb_4 (preds = {bb_11 bb_10 }, succs = {bb_6 bb_15 })
+    {
+      <bb 4> [local count: 14598063]:
+      # i_50 = PHI <j_24(11), 0(10)>
+      # .MEM_54 = PHI <.MEM_89(11), .MEM_22(D)(10)>
+      j_24 = i_50 + 1;
+      if (n_23(D) > j_24)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 15>; [11.00%]
+
+    }
+    bb_15 (preds = {bb_4 }, succs = {bb_5 })
+    {
+      <bb 15> [local count: 1605787]:
+
+    }
+    bb_5 (preds = {bb_15 bb_17 }, succs = {bb_11 bb_16 })
+    {
+      <bb 5> [local count: 14598063]:
+      # .MEM_89 = PHI <.MEM_54(15), .MEM_86(17)>
+      if (j_24 < _45)
+        goto <bb 11>; [89.00%]
+      else
+        goto <bb 16>; [11.00%]
+
+    }
+    bb_11 (preds = {bb_5 }, succs = {bb_4 })
+    {
+      <bb 11> [local count: 12992276]:
+      goto <bb 4>; [100.00%]
+
+    }
+    bb_6 (preds = {bb_4 }, succs = {bb_7 })
+    {
+      <bb 6> [local count: 12992276]:
+      _6 = m_25(D) * i_50;
+      _7 = _6 + i_50;
+      _8 = (sizetype) _7;
+      _9 = _8 + 1;
+      _10 = _9 * 4;
+      _87 = n_23(D) - j_24;
+
+    }
+    bb_17 (preds = {bb_9 }, succs = {bb_5 })
+    {
+      <bb 17> [local count: 12992276]:
+      # .MEM_86 = PHI <.MEM_55(9)>
+      goto <bb 5>; [100.00%]
+
+    }
+    loop_2 (header = 7, latch = 12, finite_p
+    niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+    upper_bound 2147483645
+    likely_upper_bound 2147483645
+    iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009))
+    {
+      bb_7 (preds = {bb_12 bb_6 }, succs = {bb_8 })
+      {
+        <bb 7> [local count: 118111600]:
+        # j_51 = PHI <j_30(12), j_24(6)>
+        # .MEM_52 = PHI <.MEM_55(12), .MEM_54(6)>
+        _1 = m_25(D) * j_51;
+        _2 = _1 + l_26(D);
+        _3 = (long unsigned int) _2;
+        _4 = _3 * 4;
+        _5 = vector_27(D) + _4;
+        # VUSE <.MEM_52>
+        t_28 = *_5;
+        _11 = _1 + i_50;
+        _12 = (sizetype) _11;
+        _13 = _12 + 1;
+        _14 = _13 * 4;
+
+      }
+      bb_9 (preds = {bb_8 }, succs = {bb_12 bb_17 })
+      {
+        <bb 9> [local count: 118111600]:
+        # .MEM_55 = PHI <.MEM_42(8)>
+        j_30 = j_51 + 1;
+        if (n_23(D) > j_30)
+          goto <bb 12>; [89.00%]
+        else
+          goto <bb 17>; [11.00%]
+
+      }
+      bb_12 (preds = {bb_9 }, succs = {bb_7 })
+      {
+        <bb 12> [local count: 105119324]:
+        goto <bb 7>; [100.00%]
+
+      }
+      loop_3 (header = 8, latch = 13, finite_p
+      niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+      upper_bound 2147483645
+      likely_upper_bound 2147483645
+      iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628))
+      {
+        bb_8 (preds = {bb_13 bb_7 }, succs = {bb_13 bb_9 })
+        {
+          <bb 8> [local count: 955630225]:
+          # i_56 = PHI <i_40(13), 0(7)>
+          # .MEM_57 = PHI <.MEM_42(13), .MEM_52(7)>
+          _32 = (long unsigned int) i_56;
+          _33 = _32 * 4;
+          _21 = _10 + _33;
+          _34 = vector_27(D) + _21;
+          # VUSE <.MEM_57>
+          _35 = *_34;
+          _29 = _14 + _33;
+          _36 = vector_27(D) + _29;
+          # VUSE <.MEM_57>
+          _37 = *_36;
+          _38 = t_28 * _37;
+          _39 = _35 + _38;
+          # .MEM_42 = VDEF <.MEM_57>
+          *_34 = _39;
+          i_40 = i_56 + 1;
+          if (i_40 < _87)
+            goto <bb 13>; [89.00%]
+          else
+            goto <bb 9>; [11.00%]
+
+        }
+        bb_13 (preds = {bb_8 }, succs = {bb_8 })
+        {
+          <bb 13> [local count: 850510901]:
+          goto <bb 8>; [100.00%]
+
+        }
+      }
+    }
+  }
+}
+Analyzing # of iterations of loop 3
+  exit condition [1, + , 1](no_overflow) < _87
+  bounds on difference of bases: -2147483649 ... 2147483646
+  result:
+    zero if _87 <= 0
+    # of iterations (unsigned int) _87 + 4294967295, bounded by 2147483646
+  number of iterations (unsigned int) _87 + 4294967295; zero if _87 <= 0
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_21
+  Type:	sizetype
+  Base:	((sizetype) _7 + 1) * 4
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_29
+  Type:	sizetype
+  Base:	((sizetype) _11 + 1) * 4
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_32
+  Type:	long unsigned int
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_33
+  Type:	long unsigned int
+  Base:	0
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_34
+  Type:	float *
+  Base:	vector_27(D) + ((sizetype) _7 + 1) * 4
+  Step:	4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_36
+  Type:	float *
+  Base:	vector_27(D) + ((sizetype) _11 + 1) * 4
+  Step:	4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_40
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_56
+  Type:	int
+  Base:	0
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+
+<IV Groups>:
+Group 0:
+  Type:	REFERENCE ADDRESS
+  Use 0.0:
+    At stmt:	_35 = *_34;
+    At pos:	*_34
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((sizetype) _7 + 1) * 4
+      Step:	4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+  Use 0.1:
+    At stmt:	*_34 = _39;
+    At pos:	*_34
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((sizetype) _7 + 1) * 4
+      Step:	4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 1:
+  Type:	REFERENCE ADDRESS
+  Use 1.0:
+    At stmt:	_37 = *_36;
+    At pos:	*_36
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((sizetype) _11 + 1) * 4
+      Step:	4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 2:
+  Type:	COMPARE
+  Use 2.0:
+    At stmt:	if (i_40 < _87)
+    At pos:	i_40
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.20
+  Var after: ivtmp.20
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.21
+  Var after: ivtmp.21
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.22
+  Var after: ivtmp.22
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.23
+  Var after: ivtmp.23
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((sizetype) _7 + 1) * 4)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.24
+  Var after: ivtmp.24
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) ((sizetype) _7 * 4) + (unsigned long) vector_27(D)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.25
+  Var after: ivtmp.25
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((sizetype) _11 + 1) * 4)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 7:
+  Var befor: ivtmp.26
+  Var after: ivtmp.26
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) ((sizetype) _11 * 4) + (unsigned long) vector_27(D)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 8:
+  Var befor: ivtmp.27
+  Var after: ivtmp.27
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 9:
+  Var befor: ivtmp.28
+  Var after: ivtmp.28
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	0
+    Step:	4
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+
+<Important Candidates>:	 0, 1, 2, 3,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3, 4, 5, 9
+  Group 1:	0, 1, 2, 3, 6, 7, 9
+  Group 2:	0, 1, 2, 3, 8
+
+<Candidate Costs>:
+  cand	cost
+  0	5
+  1	5
+  2	5
+  3	4
+  4	6
+  5	6
+  6	6
+  7	6
+  8	5
+  9	5
+
+
+<Invariant Vars>:
+Inv 6:	_7	(eliminable)
+Inv 1:	_10	(eliminable)
+Inv 7:	_11	(eliminable)
+Inv 3:	_14	(eliminable)
+Inv 2:	vector_27(D)	(eliminable)
+Inv 4:	t_28	(eliminable)
+Inv 5:	_87	(eliminable)
+
+<Invariant Expressions>:
+inv_expr 1: 	(unsigned long) _7 * 4 + (unsigned long) vector_27(D)
+inv_expr 2: 	((unsigned long) _7 - (unsigned long) _11) * 4
+inv_expr 3: 	(unsigned long) _11 * 18446744073709551612 + (unsigned long) _7 * 4
+inv_expr 4: 	(unsigned long) _11 * 4 + (unsigned long) vector_27(D)
+inv_expr 5: 	((unsigned long) _11 - (unsigned long) _7) * 4
+inv_expr 6: 	(unsigned long) _7 * 18446744073709551612 + (unsigned long) _11 * 4
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	22	4	1;	NIL;
+  2	22	2	1;	NIL;
+  4	2	0	NIL;	NIL;
+  5	2	2	NIL;	NIL;
+  6	16	2	2;	NIL;
+  7	16	4	3;	NIL;
+  9	14	4	1;	NIL;
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	11	2	4;	NIL;
+  2	11	1	4;	NIL;
+  4	8	1	5;	NIL;
+  5	8	2	6;	NIL;
+  6	1	0	NIL;	NIL;
+  7	1	1	NIL;	NIL;
+  9	7	2	4;	NIL;
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	5
+  1	0	0	NIL;	5
+  2	4	0	NIL;	5
+  3	0	0	NIL;	5
+  8	4	0	NIL;	5
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 0
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	38
+  20	40
+  21	42
+  22	44
+  23	115
+  24	120
+  25	125
+  26	130
+  27	179
+  28	228
+  29	277
+  30	326
+  31	375
+  32	424
+  33	473
+  34	522
+  35	571
+  36	620
+  37	669
+  38	718
+  39	767
+  40	816
+  41	865
+  42	914
+  43	963
+  44	1012
+  45	1061
+  46	1110
+  47	1159
+  48	1208
+  49	1257
+  50	1306
+  51	1355
+  52	1404
+
+Initial set of candidates:
+  cost: 47 (complexity 3)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 37 (complexity 3)
+  candidates: 2
+   group:0 --> iv_cand:2, cost=(22,2)
+   group:1 --> iv_cand:2, cost=(11,1)
+   group:2 --> iv_cand:2, cost=(4,0)
+  invariant variables: 5
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 31 (complexity 1)
+  reg_cost: 6
+  cand_cost: 11
+  cand_group_cost: 14 (complexity 1)
+  candidates: 2, 4
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:4, cost=(8,1)
+   group:2 --> iv_cand:2, cost=(4,0)
+  invariant variables: 5
+  invariant expressions: 5
+
+Improved to:
+  cost: 26 (complexity 1)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 10 (complexity 1)
+  candidates: 3, 4
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:4, cost=(8,1)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 5
+
+Improved to:
+  cost: 26 (complexity 0)
+  reg_cost: 7
+  cand_cost: 16
+  cand_group_cost: 3 (complexity 0)
+  candidates: 3, 4, 6
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:6, cost=(1,0)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 
+
+Initial set of candidates:
+  cost: 37 (complexity 6)
+  reg_cost: 7
+  cand_cost: 9
+  cand_group_cost: 21 (complexity 6)
+  candidates: 3, 9
+   group:0 --> iv_cand:9, cost=(14,4)
+   group:1 --> iv_cand:9, cost=(7,2)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 26 (complexity 1)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 10 (complexity 1)
+  candidates: 3, 4
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:4, cost=(8,1)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 5
+
+Improved to:
+  cost: 26 (complexity 0)
+  reg_cost: 7
+  cand_cost: 16
+  cand_group_cost: 3 (complexity 0)
+  candidates: 3, 4, 6
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:6, cost=(1,0)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 
+
+Original cost 26 (complexity 0)
+
+Final cost 26 (complexity 0)
+
+Selected IV set for loop 3 at fp_foo.c:3, 10 avg niters, 3 IVs:
+Candidate 3:
+  Var befor: i_56
+  Var after: i_40
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.23_85
+  Var after: ivtmp.23_84
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((sizetype) _7 + 1) * 4)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.25_78
+  Var after: ivtmp.25_77
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((sizetype) _11 + 1) * 4)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+;;
+;; Loop 2
+;;  header 7, latch 12
+;;  depth 2, outer 1, finite_p
+;;  niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+;;  upper_bound 2147483645
+;;  likely_upper_bound 2147483645
+;;  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009)
+;;  nodes: 7 12 9 8 13
+Processing loop 2 at fp_foo.c:9
+  single exit 9 -> 17, exit condition if (n_23(D) > j_30)
+
+
+
+Loops in function: dgefa
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_10 bb_14 })
+  {
+    <bb 2> [local count: 1804255]:
+    _45 = n_23(D) + -1;
+    if (n_23(D) > 1)
+      goto <bb 10>; [89.00%]
+    else
+      goto <bb 14>; [11.00%]
+
+  }
+  bb_14 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 14> [local count: 198468]:
+
+  }
+  bb_3 (preds = {bb_14 bb_16 }, succs = {bb_1 })
+  {
+    <bb 3> [local count: 1804255]:
+    # .MEM_88 = PHI <.MEM_22(D)(14), .MEM_53(16)>
+    # VUSE <.MEM_88>
+    return;
+
+  }
+  bb_10 (preds = {bb_2 }, succs = {bb_4 })
+  {
+    <bb 10> [local count: 1605787]:
+
+  }
+  bb_16 (preds = {bb_5 }, succs = {bb_3 })
+  {
+    <bb 16> [local count: 1605787]:
+    # .MEM_53 = PHI <.MEM_89(5)>
+    goto <bb 3>; [100.00%]
+
+  }
+  loop_1 (header = 4, latch = 11, finite_p
+  niter (unsigned int) n_23(D) + 4294967294
+  upper_bound 2147483645
+  likely_upper_bound 2147483645
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900))
+  {
+    bb_4 (preds = {bb_11 bb_10 }, succs = {bb_6 bb_15 })
+    {
+      <bb 4> [local count: 14598063]:
+      # i_50 = PHI <j_24(11), 0(10)>
+      # .MEM_54 = PHI <.MEM_89(11), .MEM_22(D)(10)>
+      j_24 = i_50 + 1;
+      if (n_23(D) > j_24)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 15>; [11.00%]
+
+    }
+    bb_15 (preds = {bb_4 }, succs = {bb_5 })
+    {
+      <bb 15> [local count: 1605787]:
+
+    }
+    bb_5 (preds = {bb_15 bb_17 }, succs = {bb_11 bb_16 })
+    {
+      <bb 5> [local count: 14598063]:
+      # .MEM_89 = PHI <.MEM_54(15), .MEM_86(17)>
+      if (j_24 < _45)
+        goto <bb 11>; [89.00%]
+      else
+        goto <bb 16>; [11.00%]
+
+    }
+    bb_11 (preds = {bb_5 }, succs = {bb_4 })
+    {
+      <bb 11> [local count: 12992276]:
+      goto <bb 4>; [100.00%]
+
+    }
+    bb_6 (preds = {bb_4 }, succs = {bb_7 })
+    {
+      <bb 6> [local count: 12992276]:
+      _6 = m_25(D) * i_50;
+      _7 = _6 + i_50;
+      _8 = (sizetype) _7;
+      _9 = _8 + 1;
+      _10 = _9 * 4;
+      _87 = n_23(D) - j_24;
+
+    }
+    bb_17 (preds = {bb_9 }, succs = {bb_5 })
+    {
+      <bb 17> [local count: 12992276]:
+      # .MEM_86 = PHI <.MEM_55(9)>
+      goto <bb 5>; [100.00%]
+
+    }
+    loop_2 (header = 7, latch = 12, finite_p
+    niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+    upper_bound 2147483645
+    likely_upper_bound 2147483645
+    iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009))
+    {
+      bb_7 (preds = {bb_12 bb_6 }, succs = {bb_8 })
+      {
+        <bb 7> [local count: 118111600]:
+        # j_51 = PHI <j_30(12), j_24(6)>
+        # .MEM_52 = PHI <.MEM_55(12), .MEM_54(6)>
+        _1 = m_25(D) * j_51;
+        _2 = _1 + l_26(D);
+        _3 = (long unsigned int) _2;
+        _4 = _3 * 4;
+        _5 = vector_27(D) + _4;
+        # VUSE <.MEM_52>
+        t_28 = *_5;
+        _11 = _1 + i_50;
+        _12 = (sizetype) _11;
+        _13 = _12 + 1;
+        _14 = _13 * 4;
+        _82 = (sizetype) _7;
+        _81 = _82 + 1;
+        _80 = _81 * 4;
+        _79 = vector_27(D) + _80;
+        ivtmp.23_83 = (unsigned long) _79;
+        _75 = (sizetype) _11;
+        _74 = _75 + 1;
+        _73 = _74 * 4;
+        _72 = vector_27(D) + _73;
+        ivtmp.25_76 = (unsigned long) _72;
+
+      }
+      bb_9 (preds = {bb_8 }, succs = {bb_12 bb_17 })
+      {
+        <bb 9> [local count: 118111600]:
+        # .MEM_55 = PHI <.MEM_42(8)>
+        j_30 = j_51 + 1;
+        if (n_23(D) > j_30)
+          goto <bb 12>; [89.00%]
+        else
+          goto <bb 17>; [11.00%]
+
+      }
+      bb_12 (preds = {bb_9 }, succs = {bb_7 })
+      {
+        <bb 12> [local count: 105119324]:
+        goto <bb 7>; [100.00%]
+
+      }
+      loop_3 (header = 8, latch = 13, finite_p
+      niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+      upper_bound 2147483645
+      likely_upper_bound 2147483645
+      iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628))
+      {
+        bb_8 (preds = {bb_13 bb_7 }, succs = {bb_13 bb_9 })
+        {
+          <bb 8> [local count: 955630225]:
+          # i_56 = PHI <i_40(13), 0(7)>
+          # .MEM_57 = PHI <.MEM_42(13), .MEM_52(7)>
+          # ivtmp.23_85 = PHI <ivtmp.23_84(13), ivtmp.23_83(7)>
+          # ivtmp.25_78 = PHI <ivtmp.25_77(13), ivtmp.25_76(7)>
+          _32 = (long unsigned int) i_56;
+          _33 = _32 * 4;
+          _21 = _10 + _33;
+          _34 = vector_27(D) + _21;
+          _71 = (void *) ivtmp.23_85;
+          # VUSE <.MEM_57>
+          _35 = MEM[(float *)_71];
+          _29 = _14 + _33;
+          _36 = vector_27(D) + _29;
+          _69 = (void *) ivtmp.25_78;
+          # VUSE <.MEM_57>
+          _37 = MEM[(float *)_69];
+          _38 = t_28 * _37;
+          _39 = _35 + _38;
+          _70 = (void *) ivtmp.23_85;
+          # .MEM_42 = VDEF <.MEM_57>
+          MEM[(float *)_70] = _39;
+          i_40 = i_56 + 1;
+          ivtmp.23_84 = ivtmp.23_85 + 4;
+          ivtmp.25_77 = ivtmp.25_78 + 4;
+          if (i_40 < _87)
+            goto <bb 13>; [89.00%]
+          else
+            goto <bb 9>; [11.00%]
+
+        }
+        bb_13 (preds = {bb_8 }, succs = {bb_8 })
+        {
+          <bb 13> [local count: 850510901]:
+          goto <bb 8>; [100.00%]
+
+        }
+      }
+    }
+  }
+}
+Analyzing # of iterations of loop 2
+  exit condition [i_50 + 2, + , 1](no_overflow) < n_23(D)
+  bounds on difference of bases: 0 ... 2147483645
+  result:
+    # of iterations ((unsigned int) n_23(D) - (unsigned int) i_50) - 2, bounded by 2147483645
+  number of iterations ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_1
+  Type:	int
+  Base:	(i_50 + 1) * m_25(D)
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_2
+  Type:	int
+  Base:	(i_50 + 1) * m_25(D) + l_26(D)
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_3
+  Type:	long unsigned int
+  Base:	(long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)
+  Step:	(long unsigned int) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_4
+  Type:	long unsigned int
+  Base:	((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4
+  Step:	(long unsigned int) m_25(D) * 4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_5
+  Type:	float *
+  Base:	vector_27(D) + ((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4
+  Step:	(long unsigned int) m_25(D) * 4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_11
+  Type:	int
+  Base:	(i_50 + 1) * m_25(D) + i_50
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_12
+  Type:	sizetype
+  Base:	(sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50
+  Step:	(sizetype) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_13
+  Type:	sizetype
+  Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1
+  Step:	(sizetype) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_14
+  Type:	sizetype
+  Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+  Step:	(sizetype) m_25(D) * 4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	j_30
+  Type:	int
+  Base:	i_50 + 2
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	j_51
+  Type:	int
+  Base:	i_50 + 1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_72
+  Type:	float *
+  Base:	vector_27(D) + (((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+  Step:	(sizetype) m_25(D) * 4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_73
+  Type:	sizetype
+  Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+  Step:	(sizetype) m_25(D) * 4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_74
+  Type:	sizetype
+  Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1
+  Step:	(sizetype) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_75
+  Type:	sizetype
+  Base:	(sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50
+  Step:	(sizetype) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	ivtmp.25_76
+  Type:	unsigned long
+  Base:	(unsigned long) (vector_27(D) + (((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4)
+  Step:	(sizetype) m_25(D) * 4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+
+<IV Groups>:
+Group 0:
+  Type:	REFERENCE ADDRESS
+  Use 0.0:
+    At stmt:	t_28 = *_5;
+    At pos:	*_5
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4
+      Step:	(long unsigned int) m_25(D) * 4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 1:
+  Type:	COMPARE
+  Use 1.0:
+    At stmt:	if (n_23(D) > j_30)
+    At pos:	j_30
+    IV struct:
+      Type:	int
+      Base:	i_50 + 2
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 2:
+  Type:	GENERIC
+  Use 2.0:
+    At stmt:	ivtmp.25_76 = (unsigned long) _72;
+    At pos:	
+    IV struct:
+      Type:	unsigned long
+      Base:	(unsigned long) (vector_27(D) + (((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4)
+      Step:	(sizetype) m_25(D) * 4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 3:
+  Type:	GENERIC
+  Use 3.0:
+    At stmt:	_14 = _13 * 4;
+    At pos:	
+    IV struct:
+      Type:	sizetype
+      Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+      Step:	(sizetype) m_25(D) * 4
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.29
+  Var after: ivtmp.29
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.30
+  Var after: ivtmp.30
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.31
+  Var after: ivtmp.31
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	(sizetype) (i_50 + 2)
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Var befor: ivtmp.32
+  Var after: ivtmp.32
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	(sizetype) (i_50 + 1)
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	i_50 + 1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.33
+  Var after: ivtmp.33
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4)
+    Step:	(unsigned long) ((long unsigned int) m_25(D) * 4)
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.34
+  Var after: ivtmp.34
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) (i_50 + 2)
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 7:
+  Var befor: ivtmp.35
+  Var after: ivtmp.35
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) i_50
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 8:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.36
+  Var after: ivtmp.36
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + (((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4)
+    Step:	(sizetype) m_25(D) * 4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 9:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.37
+  Var after: ivtmp.37
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) * 4) + (unsigned long) vector_27(D)
+    Step:	(sizetype) m_25(D) * 4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 10:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.38
+  Var after: ivtmp.38
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+    Step:	(sizetype) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 11:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.39
+  Var after: ivtmp.39
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) * 4
+    Step:	(sizetype) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 12:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.40
+  Var after: ivtmp.40
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	0
+    Step:	(long unsigned int) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+<Important Candidates>:	 0, 1, 2, 3, 4,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3, 4, 5, 12
+  Group 1:	0, 1, 2, 3, 4, 6, 7
+  Group 2:	0, 1, 2, 3, 4, 8, 9, 10, 11, 12
+  Group 3:	0, 1, 2, 3, 4, 10, 11, 12
+
+<Candidate Costs>:
+  cand	cost
+  0	5
+  1	5
+  2	6
+  3	6
+  4	4
+  5	9
+  6	5
+  7	5
+  8	10
+  9	9
+  10	10
+  11	9
+  12	5
+
+
+<Invariant Vars>:
+Inv 6:	_7
+Inv 8:	_10
+Inv 7:	n_23(D)	(eliminable)
+Inv 1:	j_24	(eliminable)
+Inv 2:	m_25(D)	(eliminable)
+Inv 3:	l_26(D)	(eliminable)
+Inv 4:	vector_27(D)
+Inv 5:	i_50	(eliminable)
+Inv 9:	_87
+
+<Invariant Expressions>:
+inv_expr 1: 	(long unsigned int) m_25(D) * 4
+inv_expr 2: 	((unsigned long) l_26(D) - (unsigned long) i_50) * 4
+inv_expr 3: 	(unsigned long) i_50 * 18446744073709551612 + (unsigned long) l_26(D) * 4
+inv_expr 4: 	((unsigned long) l_26(D) * 4 + (unsigned long) vector_27(D)) - (unsigned long) i_50 * 4
+inv_expr 5: 	((unsigned long) ((i_50 + 1) * m_25(D)) + (unsigned long) l_26(D)) * 4 + (unsigned long) vector_27(D)
+inv_expr 6: 	((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967295
+inv_expr 7: 	(signed int) i_50 + 1
+inv_expr 8: 	(unsigned long) (((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967294) + 1
+inv_expr 9: 	((sizetype) i_50 + (sizetype) (((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967294)) + 3
+inv_expr 10: 	((sizetype) i_50 + (sizetype) (((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967294)) + 2
+inv_expr 11: 	(((signed long) i_50 - (signed long) l_26(D)) + 1) * 4
+inv_expr 12: 	(signed long) vector_27(D) + 4
+inv_expr 13: 	(((signed long) ((i_50 + 1) * m_25(D)) * 4 + (signed long) vector_27(D)) + (signed long) i_50 * 4) + 4
+inv_expr 14: 	(((signed long) i_50 * 4 - (signed long) vector_27(D)) - (signed long) l_26(D) * 4) + 4
+inv_expr 15: 	4 - (signed long) vector_27(D)
+inv_expr 16: 	(((signed long) ((i_50 + 1) * m_25(D)) + (signed long) i_50) + 1) * 4
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  5	1	0	NIL;	NIL;
+  8	8	2	2;	NIL;
+  9	8	1	3;	NIL;
+  10	8	2	4;	NIL;
+  11	8	1	4;	NIL;
+  12	10	1	5;	NIL;
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	6;	NIL;
+  1	2	0	8;	NIL;
+  2	3	0	9;	NIL;
+  3	0	0	NIL;	7
+  4	0	0	NIL;	7
+  6	0	0	NIL;	7
+  7	0	0	NIL;	7
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  5	6	0	11;	NIL;
+  8	0	0	NIL;	NIL;
+  9	4	0	NIL;	NIL;
+  10	4	0	NIL;	NIL;
+  11	4	0	12;	NIL;
+  12	9	0	13;	NIL;
+
+Group 3:
+  cand	cost	compl.	inv.expr.	inv.vars
+  5	7	0	14;	NIL;
+  8	8	0	NIL;	NIL;
+  9	4	0	15;	NIL;
+  10	0	0	NIL;	NIL;
+  11	4	0	NIL;	NIL;
+  12	9	0	16;	NIL;
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 4
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	111
+  20	116
+  21	121
+  22	126
+  23	151
+  24	176
+  25	201
+  26	226
+  27	275
+  28	324
+  29	373
+  30	422
+  31	471
+  32	520
+  33	569
+  34	618
+  35	667
+  36	716
+  37	765
+  38	814
+  39	863
+  40	912
+  41	961
+  42	1010
+  43	1059
+  44	1108
+  45	1157
+  46	1206
+  47	1255
+  48	1304
+  49	1353
+  50	1402
+  51	1451
+  52	1500
+
+Initial set of candidates:
+  cost: 35 (complexity 0)
+  reg_cost: 8
+  cand_cost: 13
+  cand_group_cost: 14 (complexity 0)
+  candidates: 4, 5
+   group:0 --> iv_cand:5, cost=(1,0)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:5, cost=(6,0)
+   group:3 --> iv_cand:5, cost=(7,0)
+  invariant variables: 7
+  invariant expressions: 1, 11, 14
+
+Improved to:
+  cost: 33 (complexity 2)
+  reg_cost: 7
+  cand_cost: 14
+  cand_group_cost: 12 (complexity 2)
+  candidates: 4, 10
+   group:0 --> iv_cand:10, cost=(8,2)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:10, cost=(4,0)
+   group:3 --> iv_cand:10, cost=(0,0)
+  invariant variables: 7
+  invariant expressions: 1, 4
+
+Initial set of candidates:
+  cost: 33 (complexity 2)
+  reg_cost: 7
+  cand_cost: 14
+  cand_group_cost: 12 (complexity 2)
+  candidates: 4, 10
+   group:0 --> iv_cand:10, cost=(8,2)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:10, cost=(4,0)
+   group:3 --> iv_cand:10, cost=(0,0)
+  invariant variables: 7
+  invariant expressions: 1, 4
+
+Original cost 33 (complexity 2)
+
+Final cost 33 (complexity 2)
+
+Selected IV set for loop 2 at fp_foo.c:9, 10 avg niters, 2 IVs:
+Candidate 4:
+  Var befor: j_51
+  Var after: j_30
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	i_50 + 1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 10:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.38_68
+  Var after: ivtmp.38_67
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+    Step:	(sizetype) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+Replacing exit test: if (n_23(D) > j_30)
+;;
+;; Loop 1
+;;  header 4, latch 11
+;;  depth 1, outer 0, finite_p
+;;  niter (unsigned int) n_23(D) + 4294967294
+;;  upper_bound 2147483645
+;;  likely_upper_bound 2147483645
+;;  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900)
+;;  nodes: 4 11 5 15 17 9 8 13 7 12 6
+Processing loop 1 at fp_foo.c:8
+  single exit 5 -> 16, exit condition if (j_24 < _45)
+
+
+
+Loops in function: dgefa
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_10 bb_14 })
+  {
+    <bb 2> [local count: 1804255]:
+    _45 = n_23(D) + -1;
+    if (n_23(D) > 1)
+      goto <bb 10>; [89.00%]
+    else
+      goto <bb 14>; [11.00%]
+
+  }
+  bb_14 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 14> [local count: 198468]:
+
+  }
+  bb_3 (preds = {bb_14 bb_16 }, succs = {bb_1 })
+  {
+    <bb 3> [local count: 1804255]:
+    # .MEM_88 = PHI <.MEM_22(D)(14), .MEM_53(16)>
+    # VUSE <.MEM_88>
+    return;
+
+  }
+  bb_10 (preds = {bb_2 }, succs = {bb_4 })
+  {
+    <bb 10> [local count: 1605787]:
+
+  }
+  bb_16 (preds = {bb_5 }, succs = {bb_3 })
+  {
+    <bb 16> [local count: 1605787]:
+    # .MEM_53 = PHI <.MEM_89(5)>
+    goto <bb 3>; [100.00%]
+
+  }
+  loop_1 (header = 4, latch = 11, finite_p
+  niter (unsigned int) n_23(D) + 4294967294
+  upper_bound 2147483645
+  likely_upper_bound 2147483645
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900))
+  {
+    bb_4 (preds = {bb_11 bb_10 }, succs = {bb_6 bb_15 })
+    {
+      <bb 4> [local count: 14598063]:
+      # i_50 = PHI <j_24(11), 0(10)>
+      # .MEM_54 = PHI <.MEM_89(11), .MEM_22(D)(10)>
+      j_24 = i_50 + 1;
+      if (n_23(D) > j_24)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 15>; [11.00%]
+
+    }
+    bb_15 (preds = {bb_4 }, succs = {bb_5 })
+    {
+      <bb 15> [local count: 1605787]:
+
+    }
+    bb_5 (preds = {bb_15 bb_17 }, succs = {bb_11 bb_16 })
+    {
+      <bb 5> [local count: 14598063]:
+      # .MEM_89 = PHI <.MEM_54(15), .MEM_86(17)>
+      if (j_24 < _45)
+        goto <bb 11>; [89.00%]
+      else
+        goto <bb 16>; [11.00%]
+
+    }
+    bb_11 (preds = {bb_5 }, succs = {bb_4 })
+    {
+      <bb 11> [local count: 12992276]:
+      goto <bb 4>; [100.00%]
+
+    }
+    bb_6 (preds = {bb_4 }, succs = {bb_7 })
+    {
+      <bb 6> [local count: 12992276]:
+      _6 = m_25(D) * i_50;
+      _7 = _6 + i_50;
+      _8 = (sizetype) _7;
+      _9 = _8 + 1;
+      _10 = _9 * 4;
+      _87 = n_23(D) - j_24;
+      _66 = (sizetype) m_25(D);
+      _65 = _66 * 4;
+      _63 = i_50 + 1;
+      _62 = m_25(D) * _63;
+      _61 = (sizetype) _62;
+      _60 = (sizetype) i_50;
+      _59 = _60 + _61;
+      _58 = _59 + 1;
+      ivtmp.38_64 = _58 * 4;
+
+    }
+    bb_17 (preds = {bb_9 }, succs = {bb_5 })
+    {
+      <bb 17> [local count: 12992276]:
+      # .MEM_86 = PHI <.MEM_55(9)>
+      goto <bb 5>; [100.00%]
+
+    }
+    loop_2 (header = 7, latch = 12, finite_p
+    niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+    upper_bound 2147483645
+    likely_upper_bound 2147483645
+    iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009))
+    {
+      bb_7 (preds = {bb_12 bb_6 }, succs = {bb_8 })
+      {
+        <bb 7> [local count: 118111600]:
+        # j_51 = PHI <j_30(12), j_24(6)>
+        # .MEM_52 = PHI <.MEM_55(12), .MEM_54(6)>
+        # ivtmp.38_68 = PHI <ivtmp.38_67(12), ivtmp.38_64(6)>
+        _1 = m_25(D) * j_51;
+        _2 = _1 + l_26(D);
+        _3 = (long unsigned int) _2;
+        _4 = _3 * 4;
+        _5 = vector_27(D) + _4;
+        _49 = (sizetype) i_50;
+        _48 = _49 * 18446744073709551612;
+        _47 = (sizetype) l_26(D);
+        _46 = _47 * 4;
+        _44 = _46 + _48;
+        _43 = vector_27(D) + _44;
+        _41 = _43 + 18446744073709551612;
+        _31 = _43 + ivtmp.38_68;
+        # VUSE <.MEM_52>
+        t_28 = MEM[(float *)_31 + -4B];
+        _11 = _1 + i_50;
+        _12 = (sizetype) _11;
+        _13 = _12 + 1;
+        _14 = ivtmp.38_68;
+        _82 = (sizetype) _7;
+        _81 = _82 + 1;
+        _80 = _81 * 4;
+        _79 = vector_27(D) + _80;
+        ivtmp.23_83 = (unsigned long) _79;
+        _75 = (sizetype) _11;
+        _74 = _75 + 1;
+        _73 = _74 * 4;
+        _72 = vector_27(D) + _73;
+        _20 = (unsigned long) vector_27(D);
+        _19 = _20 + ivtmp.38_68;
+        ivtmp.25_76 = _19;
+
+      }
+      bb_9 (preds = {bb_8 }, succs = {bb_12 bb_17 })
+      {
+        <bb 9> [local count: 118111600]:
+        # .MEM_55 = PHI <.MEM_42(8)>
+        j_30 = j_51 + 1;
+        ivtmp.38_67 = ivtmp.38_68 + _65;
+        if (j_30 != n_23(D))
+          goto <bb 12>; [89.00%]
+        else
+          goto <bb 17>; [11.00%]
+
+      }
+      bb_12 (preds = {bb_9 }, succs = {bb_7 })
+      {
+        <bb 12> [local count: 105119324]:
+        goto <bb 7>; [100.00%]
+
+      }
+      loop_3 (header = 8, latch = 13, finite_p
+      niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+      upper_bound 2147483645
+      likely_upper_bound 2147483645
+      iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628))
+      {
+        bb_8 (preds = {bb_13 bb_7 }, succs = {bb_13 bb_9 })
+        {
+          <bb 8> [local count: 955630225]:
+          # i_56 = PHI <i_40(13), 0(7)>
+          # .MEM_57 = PHI <.MEM_42(13), .MEM_52(7)>
+          # ivtmp.23_85 = PHI <ivtmp.23_84(13), ivtmp.23_83(7)>
+          # ivtmp.25_78 = PHI <ivtmp.25_77(13), ivtmp.25_76(7)>
+          _32 = (long unsigned int) i_56;
+          _33 = _32 * 4;
+          _21 = _10 + _33;
+          _34 = vector_27(D) + _21;
+          _71 = (void *) ivtmp.23_85;
+          # VUSE <.MEM_57>
+          _35 = MEM[(float *)_71];
+          _29 = _14 + _33;
+          _36 = vector_27(D) + _29;
+          _69 = (void *) ivtmp.25_78;
+          # VUSE <.MEM_57>
+          _37 = MEM[(float *)_69];
+          _38 = t_28 * _37;
+          _39 = _35 + _38;
+          _70 = (void *) ivtmp.23_85;
+          # .MEM_42 = VDEF <.MEM_57>
+          MEM[(float *)_70] = _39;
+          i_40 = i_56 + 1;
+          ivtmp.23_84 = ivtmp.23_85 + 4;
+          ivtmp.25_77 = ivtmp.25_78 + 4;
+          if (i_40 < _87)
+            goto <bb 13>; [89.00%]
+          else
+            goto <bb 9>; [11.00%]
+
+        }
+        bb_13 (preds = {bb_8 }, succs = {bb_8 })
+        {
+          <bb 13> [local count: 850510901]:
+          goto <bb 8>; [100.00%]
+
+        }
+      }
+    }
+  }
+}
+Analyzing # of iterations of loop 1
+  exit condition [1, + , 1](no_overflow) < n_23(D) + -1
+  bounds on difference of bases: 0 ... 2147483645
+  result:
+    # of iterations (unsigned int) n_23(D) + 4294967294, bounded by 2147483645
+  number of iterations (unsigned int) n_23(D) + 4294967294
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_6
+  Type:	int
+  Base:	0
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_7
+  Type:	int
+  Base:	0
+  Step:	(int) ((unsigned int) m_25(D) + 1)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	j_24
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_41
+  Type:	float *
+  Base:	vector_27(D) + ((sizetype) l_26(D) * 4 + 18446744073709551612)
+  Step:	18446744073709551612
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_43
+  Type:	float *
+  Base:	vector_27(D) + (sizetype) l_26(D) * 4
+  Step:	18446744073709551612
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_44
+  Type:	sizetype
+  Base:	(sizetype) l_26(D) * 4
+  Step:	18446744073709551612
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_48
+  Type:	sizetype
+  Base:	0
+  Step:	18446744073709551612
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_49
+  Type:	sizetype
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_50
+  Type:	int
+  Base:	0
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_60
+  Type:	sizetype
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_62
+  Type:	int
+  Base:	m_25(D)
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_63
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_87
+  Type:	int
+  Base:	n_23(D) + -1
+  Step:	-1
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+
+<IV Groups>:
+Group 0:
+  Type:	COMPARE
+  Use 0.0:
+    At stmt:	if (n_23(D) > j_24)
+    At pos:	j_24
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 1:
+  Type:	COMPARE
+  Use 1.0:
+    At stmt:	if (j_24 < _45)
+    At pos:	j_24
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 2:
+  Type:	COMPARE
+  Use 2.0:
+    At stmt:	if (i_40 < _87)
+    At pos:	_87
+    IV struct:
+      Type:	int
+      Base:	n_23(D) + -1
+      Step:	-1
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 3:
+  Type:	GENERIC
+  Use 3.0:
+    At stmt:	j_24 = i_50 + 1;
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 4:
+  Type:	GENERIC
+  Use 4.0:
+    At stmt:	_43 = vector_27(D) + _44;
+    At pos:	
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + (sizetype) l_26(D) * 4
+      Step:	18446744073709551612
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	No-overflow
+Group 5:
+  Type:	GENERIC
+  Use 5.0:
+    At stmt:	i_50 = PHI <j_24(11), 0(10)>
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	0
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 6:
+  Type:	GENERIC
+  Use 6.0:
+    At stmt:	_7 = _6 + i_50;
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	0
+      Step:	(int) ((unsigned int) m_25(D) + 1)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 7:
+  Type:	GENERIC
+  Use 7.0:
+    At stmt:	_62 = m_25(D) * _63;
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	m_25(D)
+      Step:	m_25(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 8:
+  Type:	GENERIC
+  Use 8.0:
+    At stmt:	_60 = (sizetype) i_50;
+    At pos:	
+    IV struct:
+      Type:	sizetype
+      Base:	0
+      Step:	1
+      Biv:	N
+      Overflowness wrto loop niter:	No-overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.41
+  Var after: ivtmp.41
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.42
+  Var after: ivtmp.42
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.43
+  Var after: ivtmp.43
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.44
+  Var after: ivtmp.44
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) (n_23(D) + -1)
+    Step:	4294967295
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.45
+  Var after: ivtmp.45
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) n_23(D)
+    Step:	4294967295
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.46
+  Var after: ivtmp.46
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + (sizetype) l_26(D) * 4)
+    Step:	18446744073709551612
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 7:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.47
+  Var after: ivtmp.47
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	(unsigned int) m_25(D) + 1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 8:
+  Var befor: ivtmp.48
+  Var after: ivtmp.48
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) m_25(D)
+    Step:	(unsigned int) m_25(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+<Important Candidates>:	 0, 1, 2, 3,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3
+  Group 1:	0, 1, 2, 3
+  Group 2:	0, 1, 2, 3, 4, 5
+  Group 3:	0, 1, 2, 3
+  Group 4:	0, 1, 2, 3, 6
+  Group 5:	0, 1, 2, 3
+  Group 6:	0, 1, 2, 3, 7
+  Group 7:	0, 1, 2, 3, 8
+  Group 8:	0, 1, 2, 3
+
+<Candidate Costs>:
+  cand	cost
+  0	5
+  1	5
+  2	5
+  3	4
+  4	5
+  5	5
+  6	6
+  7	5
+  8	5
+
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 0 (scratch: 0) -> 0
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 2.00: 9 (scratch: 1) -> 17
+Scaling cost based on bb prob by 2.00: 0 (scratch: 0) -> 0
+
+<Invariant Vars>:
+Inv 1:	n_23(D)
+Inv 4:	m_25(D)
+Inv 5:	l_26(D)
+Inv 3:	vector_27(D)
+Inv 2:	_45	(eliminable)
+
+<Invariant Expressions>:
+inv_expr 1: 	(unsigned int) m_25(D) + 1
+inv_expr 2: 	(signed int) n_23(D) + 1
+inv_expr 3: 	(signed int) n_23(D) + -1
+inv_expr 4: 	(signed long) l_26(D) * 4 + (signed long) vector_27(D)
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	4	0	NIL;	NIL;
+  1	4	0	NIL;	NIL;
+  2	0	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  4	4	0	NIL;	NIL;
+  5	4	0	2;	NIL;
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	NIL;
+  1	0	0	NIL;	2
+  2	0	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  4	0	0	NIL;	NIL;
+  5	0	0	NIL;	NIL;
+  6	3	0	NIL;	NIL;
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	80	0	3;	NIL;
+  1	80	0	3;	NIL;
+  2	80	0	NIL;	NIL;
+  3	80	0	NIL;	NIL;
+  4	0	0	NIL;	NIL;
+  5	80	0	NIL;	NIL;
+
+Group 3:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	4	0	NIL;	NIL;
+  1	4	0	NIL;	NIL;
+  2	0	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  4	4	0	NIL;	NIL;
+  5	4	0	2;	NIL;
+
+Group 4:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	17	0	4;	NIL;
+  6	0	0	NIL;	NIL;
+
+Group 5:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	NIL;
+  1	0	0	NIL;	NIL;
+  2	4	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  4	4	0	3;	NIL;
+  5	4	0	NIL;	NIL;
+
+Group 6:
+  cand	cost	compl.	inv.expr.	inv.vars
+  7	0	0	NIL;	NIL;
+
+Group 7:
+  cand	cost	compl.	inv.expr.	inv.vars
+  8	0	0	NIL;	NIL;
+
+Group 8:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	0	0	NIL;	NIL;
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 4
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	111
+  20	116
+  21	121
+  22	126
+  23	151
+  24	176
+  25	201
+  26	226
+  27	275
+  28	324
+  29	373
+  30	422
+  31	471
+  32	520
+  33	569
+  34	618
+  35	667
+  36	716
+  37	765
+  38	814
+  39	863
+  40	912
+  41	961
+  42	1010
+  43	1059
+  44	1108
+  45	1157
+  46	1206
+  47	1255
+  48	1304
+  49	1353
+  50	1402
+  51	1451
+  52	1500
+
+Initial set of candidates:
+  cost: 126 (complexity 0)
+  reg_cost: 10
+  cand_cost: 19
+  cand_group_cost: 97 (complexity 0)
+  candidates: 1, 3, 7, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:3, cost=(80,0)
+   group:3 --> iv_cand:3, cost=(0,0)
+   group:4 --> iv_cand:1, cost=(17,0)
+   group:5 --> iv_cand:3, cost=(0,0)
+   group:6 --> iv_cand:7, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 53 (complexity 0)
+  reg_cost: 12
+  cand_cost: 24
+  cand_group_cost: 17 (complexity 0)
+  candidates: 1, 3, 4, 7, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:3, cost=(0,0)
+   group:4 --> iv_cand:1, cost=(17,0)
+   group:5 --> iv_cand:3, cost=(0,0)
+   group:6 --> iv_cand:7, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 43 (complexity 0)
+  reg_cost: 13
+  cand_cost: 30
+  cand_group_cost: 0 (complexity 0)
+  candidates: 1, 3, 4, 6, 7, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:3, cost=(0,0)
+   group:4 --> iv_cand:6, cost=(0,0)
+   group:5 --> iv_cand:3, cost=(0,0)
+   group:6 --> iv_cand:7, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Initial set of candidates:
+  cost: 55 (complexity 0)
+  reg_cost: 10
+  cand_cost: 20
+  cand_group_cost: 25 (complexity 0)
+  candidates: 1, 4, 7, 8
+   group:0 --> iv_cand:4, cost=(4,0)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:4, cost=(4,0)
+   group:4 --> iv_cand:1, cost=(17,0)
+   group:5 --> iv_cand:1, cost=(0,0)
+   group:6 --> iv_cand:7, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 45 (complexity 0)
+  reg_cost: 11
+  cand_cost: 26
+  cand_group_cost: 8 (complexity 0)
+  candidates: 1, 4, 6, 7, 8
+   group:0 --> iv_cand:4, cost=(4,0)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:4, cost=(4,0)
+   group:4 --> iv_cand:6, cost=(0,0)
+   group:5 --> iv_cand:1, cost=(0,0)
+   group:6 --> iv_cand:7, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Improved to:
+  cost: 43 (complexity 0)
+  reg_cost: 13
+  cand_cost: 30
+  cand_group_cost: 0 (complexity 0)
+  candidates: 1, 3, 4, 6, 7, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:3, cost=(0,0)
+   group:4 --> iv_cand:6, cost=(0,0)
+   group:5 --> iv_cand:3, cost=(0,0)
+   group:6 --> iv_cand:7, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Original cost 43 (complexity 0)
+
+Final cost 43 (complexity 0)
+
+Selected IV set for loop 1 at fp_foo.c:8, 10 avg niters, 6 IVs:
+Candidate 1:
+  Var befor: ivtmp.42_18
+  Var after: ivtmp.42_17
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Var befor: i_50
+  Var after: j_24
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.44_16
+  Var after: ivtmp.44_15
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) (n_23(D) + -1)
+    Step:	4294967295
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.46_92
+  Var after: ivtmp.46_93
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + (sizetype) l_26(D) * 4)
+    Step:	18446744073709551612
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 7:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.47_98
+  Var after: ivtmp.47_99
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	(unsigned int) m_25(D) + 1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 8:
+  Var befor: ivtmp.48_102
+  Var after: ivtmp.48_103
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) m_25(D)
+    Step:	(unsigned int) m_25(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+Replacing exit test: if (j_24 < _45)
diff --git a/gcc/testsuite/before.s b/gcc/testsuite/before.s
new file mode 100644
index 00000000000..e13834bdf59
--- /dev/null
+++ b/gcc/testsuite/before.s
@@ -0,0 +1,152 @@
+	.file	1 "fp_foo.c"
+	.section .mdebug.abi64
+	.previous
+	.nan	2008
+	.module	fp=64
+	.module	oddspreg
+	.module	arch=mips64r6
+	.abicalls
+	.text
+	.align	2
+	.align	3
+	.globl	daxpy
+	.set	nomips16
+	.set	nomicromips
+	.ent	daxpy
+	.type	daxpy, @function
+daxpy:
+	.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0
+	.mask	0x00000000,0
+	.fmask	0x00000000,0
+	.set	noreorder
+	.set	nomacro
+	blezc	$6,.L7
+	dlsa	$6,$6,$4,2
+	.align	3
+.L3:
+	lwc1	$f1,0($5)
+	daddiu	$4,$4,4
+	lwc1	$f0,-4($4)
+	daddiu	$5,$5,4
+	maddf.s	$f0,$f1,$f15
+	bne	$4,$6,.L3
+	swc1	$f0,-4($4)
+
+.L7:
+	jrc	$31
+	.set	macro
+	.set	reorder
+	.end	daxpy
+	.size	daxpy, .-daxpy
+	.align	2
+	.align	3
+	.globl	dgefa
+	.set	nomips16
+	.set	nomicromips
+	.ent	dgefa
+	.type	dgefa, @function
+dgefa:
+	.frame	$sp,48,$31		# vars= 0, regs= 6/0, args= 0, gp= 0
+	.mask	0x101f0000,-8
+	.fmask	0x00000000,0
+	.set	noreorder
+	.set	nomacro
+	li	$2,1			# 0x1
+	bgec	$2,$6,.L23
+	daddiu	$sp,$sp,-48
+	addiu	$14,$6,-1
+	move	$11,$6
+	sd	$20,32($sp)
+	sd	$19,24($sp)
+	addiu	$20,$5,1
+	sd	$18,16($sp)
+	move	$18,$4
+	sd	$17,8($sp)
+	dlsa	$10,$7,$4,2
+	sd	$16,0($sp)
+	move	$17,$5
+	dsll	$12,$5,2
+	move	$25,$5
+	move	$13,$0
+	move	$24,$0
+	move	$15,$0
+	move	$19,$14
+	.align	3
+.L11:
+	addiu	$8,$15,1
+	addiu	$16,$15,1
+	move	$15,$8
+	bgec	$8,$11,.L15
+	daddu	$5,$25,$24
+	daddiu	$9,$13,1
+	dsubu	$6,$0,$13
+	dsll	$5,$5,2
+	dlsa	$9,$9,$18,2
+	dsll	$6,$6,2
+	move	$7,$14
+	.align	3
+.L14:
+	daddu	$3,$10,$5
+	move	$2,$9
+	lwc1	$f2,0($3)
+	move	$4,$0
+	.align	3
+.L13:
+	daddu	$3,$6,$2
+	lwc1	$f0,0($2)
+	daddu	$3,$3,$5
+	daddiu	$2,$2,4
+	lwc1	$f1,0($3)
+	addiu	$4,$4,1
+	maddf.s	$f0,$f2,$f1
+	swc1	$f0,-4($2)
+	bltc	$4,$7,.L13
+	addiu	$8,$8,1
+	bne	$11,$8,.L14
+	daddu	$5,$5,$12
+
+.L15:
+	daddiu	$24,$24,1
+	addu	$13,$20,$13
+	addiu	$14,$14,-1
+	daddiu	$10,$10,-4
+	bne	$19,$16,.L11
+	addu	$25,$17,$25
+
+	ld	$20,32($sp)
+	ld	$19,24($sp)
+	ld	$18,16($sp)
+	ld	$17,8($sp)
+	ld	$16,0($sp)
+	jr	$31
+	daddiu	$sp,$sp,48
+
+.L23:
+	jrc	$31
+	.set	macro
+	.set	reorder
+	.end	dgefa
+	.size	dgefa, .-dgefa
+	.section	.text.startup,"ax",@progbits
+	.align	2
+	.align	3
+	.globl	main
+	.set	nomips16
+	.set	nomicromips
+	.ent	main
+	.type	main, @function
+main:
+	.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0
+	.mask	0x00000000,0
+	.fmask	0x00000000,0
+	.set	noreorder
+	.set	nomacro
+	jr	$31
+	move	$2,$0
+
+	.set	macro
+	.set	reorder
+	.end	main
+	.size	main, .-main
+	.ident	"GCC: (GNU) 14.0.1 20240214 (experimental)"
+	.section	.note.GNU-stack,"",@progbits
diff --git a/gcc/testsuite/before.txt b/gcc/testsuite/before.txt
new file mode 100644
index 00000000000..c87764b8ae9
--- /dev/null
+++ b/gcc/testsuite/before.txt
@@ -0,0 +1,2694 @@
+tree_ssa_iv_optimize
+;;
+;; Loop 1
+;;  header 3, latch 6
+;;  depth 1, outer 0, finite_p
+;;  niter (unsigned int) n_12(D) + 4294967295
+;;  upper_bound 2147483646
+;;  likely_upper_bound 2147483646
+;;  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:105119324 (estimated locally, freq 0.8900)
+;;  nodes: 3 6
+Processing loop 1 at fp_foo.c:3
+  single exit 3 -> 7, exit condition if (n_12(D) > i_17)
+
+
+
+Loops in function: daxpy
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_5 bb_4 })
+  {
+    <bb 2> [local count: 118111600]:
+    if (n_12(D) > 0)
+      goto <bb 5>; [89.00%]
+    else
+      goto <bb 4>; [11.00%]
+
+  }
+  bb_5 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 5> [local count: 105119324]:
+
+  }
+  bb_7 (preds = {bb_3 }, succs = {bb_4 })
+  {
+    <bb 7> [local count: 105119324]:
+    # .MEM_22 = PHI <.MEM_16(3)>
+
+  }
+  bb_4 (preds = {bb_2 bb_7 }, succs = {bb_1 })
+  {
+    <bb 4> [local count: 118111600]:
+    # .MEM_29 = PHI <.MEM_11(D)(2), .MEM_22(7)>
+    # VUSE <.MEM_29>
+    return;
+
+  }
+  loop_1 (header = 3, latch = 6, finite_p
+  niter (unsigned int) n_12(D) + 4294967295
+  upper_bound 2147483646
+  likely_upper_bound 2147483646
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:105119324 (estimated locally, freq 0.8900))
+  {
+    bb_3 (preds = {bb_6 bb_5 }, succs = {bb_6 bb_7 })
+    {
+      <bb 3> [local count: 955630224]:
+      # i_20 = PHI <i_17(6), 0(5)>
+      # .MEM_21 = PHI <.MEM_16(6), .MEM_11(D)(5)>
+      _1 = (long unsigned int) i_20;
+      _2 = _1 * 4;
+      _3 = vector1_13(D) + _2;
+      # VUSE <.MEM_21>
+      _4 = *_3;
+      _5 = vector2_14(D) + _2;
+      # VUSE <.MEM_21>
+      _6 = *_5;
+      _7 = _6 * fp_const_15(D);
+      _8 = _4 + _7;
+      # .MEM_16 = VDEF <.MEM_21>
+      *_3 = _8;
+      i_17 = i_20 + 1;
+      if (n_12(D) > i_17)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 7>; [11.00%]
+
+    }
+    bb_6 (preds = {bb_3 }, succs = {bb_3 })
+    {
+      <bb 6> [local count: 850510900]:
+      goto <bb 3>; [100.00%]
+
+    }
+  }
+}
+Analyzing # of iterations of loop 1
+  exit condition [1, + , 1](no_overflow) < n_12(D)
+  bounds on difference of bases: 0 ... 2147483646
+  result:
+    # of iterations (unsigned int) n_12(D) + 4294967295, bounded by 2147483646
+  number of iterations (unsigned int) n_12(D) + 4294967295
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_1
+  Type:	long unsigned int
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_2
+  Type:	long unsigned int
+  Base:	0
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_3
+  Type:	float *
+  Base:	vector1_13(D)
+  Step:	4
+  Object:	(void *) vector1_13(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_5
+  Type:	float *
+  Base:	vector2_14(D)
+  Step:	4
+  Object:	(void *) vector2_14(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_17
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_20
+  Type:	int
+  Base:	0
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+
+<IV Groups>:
+Group 0:
+  Type:	REFERENCE ADDRESS
+  Use 0.0:
+    At stmt:	_4 = *_3;
+    At pos:	*_3
+    IV struct:
+      Type:	float *
+      Base:	vector1_13(D)
+      Step:	4
+      Object:	(void *) vector1_13(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+  Use 0.1:
+    At stmt:	*_3 = _8;
+    At pos:	*_3
+    IV struct:
+      Type:	float *
+      Base:	vector1_13(D)
+      Step:	4
+      Object:	(void *) vector1_13(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 1:
+  Type:	REFERENCE ADDRESS
+  Use 1.0:
+    At stmt:	_6 = *_5;
+    At pos:	*_5
+    IV struct:
+      Type:	float *
+      Base:	vector2_14(D)
+      Step:	4
+      Object:	(void *) vector2_14(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 2:
+  Type:	COMPARE
+  Use 2.0:
+    At stmt:	if (n_12(D) > i_17)
+    At pos:	i_17
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.6
+  Var after: ivtmp.6
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.7
+  Var after: ivtmp.7
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.8
+  Var after: ivtmp.8
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.9
+  Var after: ivtmp.9
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector1_13(D)
+    Step:	4
+    Object:	(void *) vector1_13(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.10
+  Var after: ivtmp.10
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector2_14(D)
+    Step:	4
+    Object:	(void *) vector2_14(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.11
+  Var after: ivtmp.11
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 7:
+  Var befor: ivtmp.12
+  Var after: ivtmp.12
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	0
+    Step:	4
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+
+<Important Candidates>:	 0, 1, 2, 3,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3, 4, 7
+  Group 1:	0, 1, 2, 3, 5, 7
+  Group 2:	0, 1, 2, 3, 6
+
+<Candidate Costs>:
+  cand	cost
+force_expr_to_var_cost size costs:
+  integer 0
+  symbol 5
+  address 5
+  other 24
+
+force_expr_to_var_cost speed costs:
+  integer 0
+  symbol 5
+  address 5
+  other 24
+
+  0	5
+  1	5
+  2	5
+  3	4
+  4	5
+  5	5
+  6	5
+  7	5
+
+
+<Invariant Vars>:
+Inv 4:	n_12(D)	(eliminable)
+Inv 1:	vector1_13(D)	(eliminable)
+Inv 2:	vector2_14(D)	(eliminable)
+Inv 3:	fp_const_15(D)	(eliminable)
+
+<Invariant Expressions>:
+inv_expr 1: 	(unsigned long) vector1_13(D) + 18446744073709551612
+inv_expr 2: 	(unsigned long) vector2_14(D) + 18446744073709551612
+inv_expr 3: 	(unsigned long) n_12(D) * 4 + (unsigned long) vector1_13(D)
+inv_expr 4: 	(unsigned long) n_12(D) * 4 + (unsigned long) vector2_14(D)
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	18	0	NIL;	1
+  2	20	0	1;	NIL;
+  4	2	0	NIL;	NIL;
+  7	10	0	NIL;	1
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	9	0	NIL;	2
+  2	10	0	2;	NIL;
+  5	1	0	NIL;	NIL;
+  7	5	0	NIL;	2
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	4
+  1	0	0	NIL;	4
+  2	1	0	NIL;	4
+  3	0	0	NIL;	4
+  4	1	0	3;	NIL;
+  5	1	0	4;	NIL;
+  6	0	0	NIL;	4
+  7	1	0	NIL;	4
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 0
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	38
+  20	40
+  21	42
+  22	44
+  23	115
+  24	120
+  25	125
+  26	130
+  27	179
+  28	228
+  29	277
+  30	326
+  31	375
+  32	424
+  33	473
+  34	522
+  35	571
+  36	620
+  37	669
+  38	718
+  39	767
+  40	816
+  41	865
+  42	914
+  43	963
+  44	1012
+  45	1061
+  46	1110
+  47	1159
+  48	1208
+  49	1257
+  50	1306
+  51	1355
+  52	1404
+
+Initial set of candidates:
+  cost: 37 (complexity 0)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 27 (complexity 0)
+  candidates: 1
+   group:0 --> iv_cand:1, cost=(18,0)
+   group:1 --> iv_cand:1, cost=(9,0)
+   group:2 --> iv_cand:1, cost=(0,0)
+  invariant variables: 1, 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 26 (complexity 0)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 16 (complexity 0)
+  candidates: 7
+   group:0 --> iv_cand:7, cost=(10,0)
+   group:1 --> iv_cand:7, cost=(5,0)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 1, 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 24 (complexity 0)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 8 (complexity 0)
+  candidates: 4, 7
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:7, cost=(5,0)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 19 (complexity 0)
+  reg_cost: 5
+  cand_cost: 10
+  cand_group_cost: 4 (complexity 0)
+  candidates: 4, 5
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:5, cost=(1,0)
+   group:2 --> iv_cand:4, cost=(1,0)
+  invariant variables: 
+  invariant expressions: 3
+
+Initial set of candidates:
+  cost: 26 (complexity 0)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 16 (complexity 0)
+  candidates: 7
+   group:0 --> iv_cand:7, cost=(10,0)
+   group:1 --> iv_cand:7, cost=(5,0)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 1, 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 24 (complexity 0)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 8 (complexity 0)
+  candidates: 4, 7
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:7, cost=(5,0)
+   group:2 --> iv_cand:7, cost=(1,0)
+  invariant variables: 2, 4
+  invariant expressions: 
+
+Improved to:
+  cost: 19 (complexity 0)
+  reg_cost: 5
+  cand_cost: 10
+  cand_group_cost: 4 (complexity 0)
+  candidates: 4, 5
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:5, cost=(1,0)
+   group:2 --> iv_cand:4, cost=(1,0)
+  invariant variables: 
+  invariant expressions: 3
+
+Original cost 19 (complexity 0)
+
+Final cost 19 (complexity 0)
+
+Selected IV set for loop 1 at fp_foo.c:3, 10 avg niters, 2 IVs:
+Candidate 4:
+  Var befor: ivtmp.9_28
+  Var after: ivtmp.9_27
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector1_13(D)
+    Step:	4
+    Object:	(void *) vector1_13(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.10_25
+  Var after: ivtmp.10_24
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) vector2_14(D)
+    Step:	4
+    Object:	(void *) vector2_14(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+Replacing exit test: if (n_12(D) > i_17)
+tree_ssa_iv_optimize
+;;
+;; Loop 3
+;;  header 8, latch 13
+;;  depth 3, outer 2, finite_p
+;;  niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+;;  upper_bound 2147483645
+;;  likely_upper_bound 2147483645
+;;  iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628)
+;;  nodes: 8 13
+Processing loop 3 at fp_foo.c:3
+  single exit 8 -> 9, exit condition if (i_40 < _87)
+
+
+
+Loops in function: dgefa
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_10 bb_14 })
+  {
+    <bb 2> [local count: 1804255]:
+    _45 = n_23(D) + -1;
+    if (n_23(D) > 1)
+      goto <bb 10>; [89.00%]
+    else
+      goto <bb 14>; [11.00%]
+
+  }
+  bb_14 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 14> [local count: 198468]:
+
+  }
+  bb_3 (preds = {bb_14 bb_16 }, succs = {bb_1 })
+  {
+    <bb 3> [local count: 1804255]:
+    # .MEM_88 = PHI <.MEM_22(D)(14), .MEM_53(16)>
+    # VUSE <.MEM_88>
+    return;
+
+  }
+  bb_10 (preds = {bb_2 }, succs = {bb_4 })
+  {
+    <bb 10> [local count: 1605787]:
+
+  }
+  bb_16 (preds = {bb_5 }, succs = {bb_3 })
+  {
+    <bb 16> [local count: 1605787]:
+    # .MEM_53 = PHI <.MEM_89(5)>
+    goto <bb 3>; [100.00%]
+
+  }
+  loop_1 (header = 4, latch = 11, finite_p
+  niter (unsigned int) n_23(D) + 4294967294
+  upper_bound 2147483645
+  likely_upper_bound 2147483645
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900))
+  {
+    bb_4 (preds = {bb_11 bb_10 }, succs = {bb_6 bb_15 })
+    {
+      <bb 4> [local count: 14598063]:
+      # i_50 = PHI <j_24(11), 0(10)>
+      # .MEM_54 = PHI <.MEM_89(11), .MEM_22(D)(10)>
+      j_24 = i_50 + 1;
+      if (n_23(D) > j_24)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 15>; [11.00%]
+
+    }
+    bb_15 (preds = {bb_4 }, succs = {bb_5 })
+    {
+      <bb 15> [local count: 1605787]:
+
+    }
+    bb_5 (preds = {bb_15 bb_17 }, succs = {bb_11 bb_16 })
+    {
+      <bb 5> [local count: 14598063]:
+      # .MEM_89 = PHI <.MEM_54(15), .MEM_86(17)>
+      if (j_24 < _45)
+        goto <bb 11>; [89.00%]
+      else
+        goto <bb 16>; [11.00%]
+
+    }
+    bb_11 (preds = {bb_5 }, succs = {bb_4 })
+    {
+      <bb 11> [local count: 12992276]:
+      goto <bb 4>; [100.00%]
+
+    }
+    bb_6 (preds = {bb_4 }, succs = {bb_7 })
+    {
+      <bb 6> [local count: 12992276]:
+      _6 = m_25(D) * i_50;
+      _7 = _6 + i_50;
+      _8 = (sizetype) _7;
+      _9 = _8 + 1;
+      _10 = _9 * 4;
+      _87 = n_23(D) - j_24;
+
+    }
+    bb_17 (preds = {bb_9 }, succs = {bb_5 })
+    {
+      <bb 17> [local count: 12992276]:
+      # .MEM_86 = PHI <.MEM_55(9)>
+      goto <bb 5>; [100.00%]
+
+    }
+    loop_2 (header = 7, latch = 12, finite_p
+    niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+    upper_bound 2147483645
+    likely_upper_bound 2147483645
+    iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009))
+    {
+      bb_7 (preds = {bb_12 bb_6 }, succs = {bb_8 })
+      {
+        <bb 7> [local count: 118111600]:
+        # j_51 = PHI <j_30(12), j_24(6)>
+        # .MEM_52 = PHI <.MEM_55(12), .MEM_54(6)>
+        _1 = m_25(D) * j_51;
+        _2 = _1 + l_26(D);
+        _3 = (long unsigned int) _2;
+        _4 = _3 * 4;
+        _5 = vector_27(D) + _4;
+        # VUSE <.MEM_52>
+        t_28 = *_5;
+        _11 = _1 + i_50;
+        _12 = (sizetype) _11;
+        _13 = _12 + 1;
+        _14 = _13 * 4;
+
+      }
+      bb_9 (preds = {bb_8 }, succs = {bb_12 bb_17 })
+      {
+        <bb 9> [local count: 118111600]:
+        # .MEM_55 = PHI <.MEM_42(8)>
+        j_30 = j_51 + 1;
+        if (n_23(D) > j_30)
+          goto <bb 12>; [89.00%]
+        else
+          goto <bb 17>; [11.00%]
+
+      }
+      bb_12 (preds = {bb_9 }, succs = {bb_7 })
+      {
+        <bb 12> [local count: 105119324]:
+        goto <bb 7>; [100.00%]
+
+      }
+      loop_3 (header = 8, latch = 13, finite_p
+      niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+      upper_bound 2147483645
+      likely_upper_bound 2147483645
+      iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628))
+      {
+        bb_8 (preds = {bb_13 bb_7 }, succs = {bb_13 bb_9 })
+        {
+          <bb 8> [local count: 955630225]:
+          # i_56 = PHI <i_40(13), 0(7)>
+          # .MEM_57 = PHI <.MEM_42(13), .MEM_52(7)>
+          _32 = (long unsigned int) i_56;
+          _33 = _32 * 4;
+          _21 = _10 + _33;
+          _34 = vector_27(D) + _21;
+          # VUSE <.MEM_57>
+          _35 = *_34;
+          _29 = _14 + _33;
+          _36 = vector_27(D) + _29;
+          # VUSE <.MEM_57>
+          _37 = *_36;
+          _38 = t_28 * _37;
+          _39 = _35 + _38;
+          # .MEM_42 = VDEF <.MEM_57>
+          *_34 = _39;
+          i_40 = i_56 + 1;
+          if (i_40 < _87)
+            goto <bb 13>; [89.00%]
+          else
+            goto <bb 9>; [11.00%]
+
+        }
+        bb_13 (preds = {bb_8 }, succs = {bb_8 })
+        {
+          <bb 13> [local count: 850510901]:
+          goto <bb 8>; [100.00%]
+
+        }
+      }
+    }
+  }
+}
+Analyzing # of iterations of loop 3
+  exit condition [1, + , 1](no_overflow) < _87
+  bounds on difference of bases: -2147483649 ... 2147483646
+  result:
+    zero if _87 <= 0
+    # of iterations (unsigned int) _87 + 4294967295, bounded by 2147483646
+  number of iterations (unsigned int) _87 + 4294967295; zero if _87 <= 0
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_21
+  Type:	sizetype
+  Base:	((sizetype) _7 + 1) * 4
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_29
+  Type:	sizetype
+  Base:	((sizetype) _11 + 1) * 4
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_32
+  Type:	long unsigned int
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_33
+  Type:	long unsigned int
+  Base:	0
+  Step:	4
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_34
+  Type:	float *
+  Base:	vector_27(D) + ((sizetype) _7 + 1) * 4
+  Step:	4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_36
+  Type:	float *
+  Base:	vector_27(D) + ((sizetype) _11 + 1) * 4
+  Step:	4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_40
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	i_56
+  Type:	int
+  Base:	0
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+
+<IV Groups>:
+Group 0:
+  Type:	REFERENCE ADDRESS
+  Use 0.0:
+    At stmt:	_35 = *_34;
+    At pos:	*_34
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((sizetype) _7 + 1) * 4
+      Step:	4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+  Use 0.1:
+    At stmt:	*_34 = _39;
+    At pos:	*_34
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((sizetype) _7 + 1) * 4
+      Step:	4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 1:
+  Type:	REFERENCE ADDRESS
+  Use 1.0:
+    At stmt:	_37 = *_36;
+    At pos:	*_36
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((sizetype) _11 + 1) * 4
+      Step:	4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 2:
+  Type:	COMPARE
+  Use 2.0:
+    At stmt:	if (i_40 < _87)
+    At pos:	i_40
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.20
+  Var after: ivtmp.20
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.21
+  Var after: ivtmp.21
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.22
+  Var after: ivtmp.22
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.23
+  Var after: ivtmp.23
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((sizetype) _7 + 1) * 4)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.24
+  Var after: ivtmp.24
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) ((sizetype) _7 * 4) + (unsigned long) vector_27(D)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.25
+  Var after: ivtmp.25
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((sizetype) _11 + 1) * 4)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 7:
+  Var befor: ivtmp.26
+  Var after: ivtmp.26
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) ((sizetype) _11 * 4) + (unsigned long) vector_27(D)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 8:
+  Var befor: ivtmp.27
+  Var after: ivtmp.27
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 9:
+  Var befor: ivtmp.28
+  Var after: ivtmp.28
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	0
+    Step:	4
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+
+<Important Candidates>:	 0, 1, 2, 3,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3, 4, 5, 9
+  Group 1:	0, 1, 2, 3, 6, 7, 9
+  Group 2:	0, 1, 2, 3, 8
+
+<Candidate Costs>:
+  cand	cost
+  0	5
+  1	5
+  2	5
+  3	4
+  4	6
+  5	6
+  6	6
+  7	6
+  8	5
+  9	5
+
+
+<Invariant Vars>:
+Inv 6:	_7	(eliminable)
+Inv 1:	_10	(eliminable)
+Inv 7:	_11	(eliminable)
+Inv 3:	_14	(eliminable)
+Inv 2:	vector_27(D)	(eliminable)
+Inv 4:	t_28	(eliminable)
+Inv 5:	_87	(eliminable)
+
+<Invariant Expressions>:
+inv_expr 1: 	((unsigned long) _7 * 4 + (unsigned long) vector_27(D)) + 4
+inv_expr 2: 	(unsigned long) _7 * 4 + (unsigned long) vector_27(D)
+inv_expr 3: 	((unsigned long) _7 - (unsigned long) _11) * 4
+inv_expr 4: 	((unsigned long) _11 * 18446744073709551612 + (unsigned long) _7 * 4) + 4
+inv_expr 5: 	((unsigned long) _11 * 4 + (unsigned long) vector_27(D)) + 4
+inv_expr 6: 	(unsigned long) _11 * 4 + (unsigned long) vector_27(D)
+inv_expr 7: 	((unsigned long) _11 - (unsigned long) _7) * 4
+inv_expr 8: 	((unsigned long) _7 * 18446744073709551612 + (unsigned long) _11 * 4) + 4
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	22	0	1;	NIL;
+  2	22	0	2;	NIL;
+  4	2	0	NIL;	NIL;
+  5	2	2	NIL;	NIL;
+  6	16	0	3;	NIL;
+  7	18	0	4;	NIL;
+  9	14	0	1;	NIL;
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	11	0	5;	NIL;
+  2	11	0	6;	NIL;
+  4	8	0	7;	NIL;
+  5	9	0	8;	NIL;
+  6	1	0	NIL;	NIL;
+  7	1	1	NIL;	NIL;
+  9	7	0	5;	NIL;
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	5
+  1	0	0	NIL;	5
+  2	4	0	NIL;	5
+  3	0	0	NIL;	5
+  8	4	0	NIL;	5
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 0
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	38
+  20	40
+  21	42
+  22	44
+  23	115
+  24	120
+  25	125
+  26	130
+  27	179
+  28	228
+  29	277
+  30	326
+  31	375
+  32	424
+  33	473
+  34	522
+  35	571
+  36	620
+  37	669
+  38	718
+  39	767
+  40	816
+  41	865
+  42	914
+  43	963
+  44	1012
+  45	1061
+  46	1110
+  47	1159
+  48	1208
+  49	1257
+  50	1306
+  51	1355
+  52	1404
+
+Initial set of candidates:
+  cost: 43 (complexity 0)
+  reg_cost: 5
+  cand_cost: 5
+  cand_group_cost: 33 (complexity 0)
+  candidates: 1
+   group:0 --> iv_cand:1, cost=(22,0)
+   group:1 --> iv_cand:1, cost=(11,0)
+   group:2 --> iv_cand:1, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 1, 5
+
+Improved to:
+  cost: 27 (complexity 0)
+  reg_cost: 6
+  cand_cost: 11
+  cand_group_cost: 10 (complexity 0)
+  candidates: 1, 4
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:4, cost=(8,0)
+   group:2 --> iv_cand:1, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 7
+
+Improved to:
+  cost: 26 (complexity 0)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 10 (complexity 0)
+  candidates: 3, 4
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:4, cost=(8,0)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 7
+
+Initial set of candidates:
+  cost: 37 (complexity 0)
+  reg_cost: 7
+  cand_cost: 9
+  cand_group_cost: 21 (complexity 0)
+  candidates: 3, 9
+   group:0 --> iv_cand:9, cost=(14,0)
+   group:1 --> iv_cand:9, cost=(7,0)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 1, 5
+
+Improved to:
+  cost: 26 (complexity 0)
+  reg_cost: 6
+  cand_cost: 10
+  cand_group_cost: 10 (complexity 0)
+  candidates: 3, 4
+   group:0 --> iv_cand:4, cost=(2,0)
+   group:1 --> iv_cand:4, cost=(8,0)
+   group:2 --> iv_cand:3, cost=(0,0)
+  invariant variables: 5
+  invariant expressions: 7
+
+Original cost 26 (complexity 0)
+
+Final cost 26 (complexity 0)
+
+Selected IV set for loop 3 at fp_foo.c:3, 10 avg niters, 2 IVs:
+Candidate 3:
+  Var befor: i_56
+  Var after: i_40
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Var befor: ivtmp.23_85
+  Var after: ivtmp.23_84
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((sizetype) _7 + 1) * 4)
+    Step:	4
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+  allowed multipliers:
+
+;;
+;; Loop 2
+;;  header 7, latch 12
+;;  depth 2, outer 1, finite_p
+;;  niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+;;  upper_bound 2147483645
+;;  likely_upper_bound 2147483645
+;;  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009)
+;;  nodes: 7 12 9 8 13
+Processing loop 2 at fp_foo.c:9
+  single exit 9 -> 17, exit condition if (n_23(D) > j_30)
+
+
+
+Loops in function: dgefa
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_10 bb_14 })
+  {
+    <bb 2> [local count: 1804255]:
+    _45 = n_23(D) + -1;
+    if (n_23(D) > 1)
+      goto <bb 10>; [89.00%]
+    else
+      goto <bb 14>; [11.00%]
+
+  }
+  bb_14 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 14> [local count: 198468]:
+
+  }
+  bb_3 (preds = {bb_14 bb_16 }, succs = {bb_1 })
+  {
+    <bb 3> [local count: 1804255]:
+    # .MEM_88 = PHI <.MEM_22(D)(14), .MEM_53(16)>
+    # VUSE <.MEM_88>
+    return;
+
+  }
+  bb_10 (preds = {bb_2 }, succs = {bb_4 })
+  {
+    <bb 10> [local count: 1605787]:
+
+  }
+  bb_16 (preds = {bb_5 }, succs = {bb_3 })
+  {
+    <bb 16> [local count: 1605787]:
+    # .MEM_53 = PHI <.MEM_89(5)>
+    goto <bb 3>; [100.00%]
+
+  }
+  loop_1 (header = 4, latch = 11, finite_p
+  niter (unsigned int) n_23(D) + 4294967294
+  upper_bound 2147483645
+  likely_upper_bound 2147483645
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900))
+  {
+    bb_4 (preds = {bb_11 bb_10 }, succs = {bb_6 bb_15 })
+    {
+      <bb 4> [local count: 14598063]:
+      # i_50 = PHI <j_24(11), 0(10)>
+      # .MEM_54 = PHI <.MEM_89(11), .MEM_22(D)(10)>
+      j_24 = i_50 + 1;
+      if (n_23(D) > j_24)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 15>; [11.00%]
+
+    }
+    bb_15 (preds = {bb_4 }, succs = {bb_5 })
+    {
+      <bb 15> [local count: 1605787]:
+
+    }
+    bb_5 (preds = {bb_15 bb_17 }, succs = {bb_11 bb_16 })
+    {
+      <bb 5> [local count: 14598063]:
+      # .MEM_89 = PHI <.MEM_54(15), .MEM_86(17)>
+      if (j_24 < _45)
+        goto <bb 11>; [89.00%]
+      else
+        goto <bb 16>; [11.00%]
+
+    }
+    bb_11 (preds = {bb_5 }, succs = {bb_4 })
+    {
+      <bb 11> [local count: 12992276]:
+      goto <bb 4>; [100.00%]
+
+    }
+    bb_6 (preds = {bb_4 }, succs = {bb_7 })
+    {
+      <bb 6> [local count: 12992276]:
+      _6 = m_25(D) * i_50;
+      _7 = _6 + i_50;
+      _8 = (sizetype) _7;
+      _9 = _8 + 1;
+      _10 = _9 * 4;
+      _87 = n_23(D) - j_24;
+
+    }
+    bb_17 (preds = {bb_9 }, succs = {bb_5 })
+    {
+      <bb 17> [local count: 12992276]:
+      # .MEM_86 = PHI <.MEM_55(9)>
+      goto <bb 5>; [100.00%]
+
+    }
+    loop_2 (header = 7, latch = 12, finite_p
+    niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+    upper_bound 2147483645
+    likely_upper_bound 2147483645
+    iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009))
+    {
+      bb_7 (preds = {bb_12 bb_6 }, succs = {bb_8 })
+      {
+        <bb 7> [local count: 118111600]:
+        # j_51 = PHI <j_30(12), j_24(6)>
+        # .MEM_52 = PHI <.MEM_55(12), .MEM_54(6)>
+        _1 = m_25(D) * j_51;
+        _2 = _1 + l_26(D);
+        _3 = (long unsigned int) _2;
+        _4 = _3 * 4;
+        _5 = vector_27(D) + _4;
+        # VUSE <.MEM_52>
+        t_28 = *_5;
+        _11 = _1 + i_50;
+        _12 = (sizetype) _11;
+        _13 = _12 + 1;
+        _14 = _13 * 4;
+        _82 = (sizetype) _7;
+        _81 = _82 + 1;
+        _80 = _81 * 4;
+        _79 = vector_27(D) + _80;
+        ivtmp.23_83 = (unsigned long) _79;
+
+      }
+      bb_9 (preds = {bb_8 }, succs = {bb_12 bb_17 })
+      {
+        <bb 9> [local count: 118111600]:
+        # .MEM_55 = PHI <.MEM_42(8)>
+        j_30 = j_51 + 1;
+        if (n_23(D) > j_30)
+          goto <bb 12>; [89.00%]
+        else
+          goto <bb 17>; [11.00%]
+
+      }
+      bb_12 (preds = {bb_9 }, succs = {bb_7 })
+      {
+        <bb 12> [local count: 105119324]:
+        goto <bb 7>; [100.00%]
+
+      }
+      loop_3 (header = 8, latch = 13, finite_p
+      niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+      upper_bound 2147483645
+      likely_upper_bound 2147483645
+      iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628))
+      {
+        bb_8 (preds = {bb_13 bb_7 }, succs = {bb_13 bb_9 })
+        {
+          <bb 8> [local count: 955630225]:
+          # i_56 = PHI <i_40(13), 0(7)>
+          # .MEM_57 = PHI <.MEM_42(13), .MEM_52(7)>
+          # ivtmp.23_85 = PHI <ivtmp.23_84(13), ivtmp.23_83(7)>
+          _32 = (long unsigned int) i_56;
+          _33 = _32 * 4;
+          _21 = _10 + _33;
+          _34 = vector_27(D) + _21;
+          _78 = (void *) ivtmp.23_85;
+          # VUSE <.MEM_57>
+          _35 = MEM[(float *)_78];
+          _29 = _14 + _33;
+          _36 = vector_27(D) + _29;
+          _76 = (sizetype) _7;
+          _75 = _76 * 18446744073709551612;
+          _74 = _75 + ivtmp.23_85;
+          _73 = (void *) _74;
+          _72 = (sizetype) _11;
+          _71 = _72 * 4;
+          _70 = _73 + _71;
+          # VUSE <.MEM_57>
+          _37 = MEM[(float *)_70];
+          _38 = t_28 * _37;
+          _39 = _35 + _38;
+          _77 = (void *) ivtmp.23_85;
+          # .MEM_42 = VDEF <.MEM_57>
+          MEM[(float *)_77] = _39;
+          i_40 = i_56 + 1;
+          ivtmp.23_84 = ivtmp.23_85 + 4;
+          if (i_40 < _87)
+            goto <bb 13>; [89.00%]
+          else
+            goto <bb 9>; [11.00%]
+
+        }
+        bb_13 (preds = {bb_8 }, succs = {bb_8 })
+        {
+          <bb 13> [local count: 850510901]:
+          goto <bb 8>; [100.00%]
+
+        }
+      }
+    }
+  }
+}
+Analyzing # of iterations of loop 2
+  exit condition [i_50 + 2, + , 1](no_overflow) < n_23(D)
+  bounds on difference of bases: 0 ... 2147483645
+  result:
+    # of iterations ((unsigned int) n_23(D) - (unsigned int) i_50) - 2, bounded by 2147483645
+  number of iterations ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_1
+  Type:	int
+  Base:	(i_50 + 1) * m_25(D)
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_2
+  Type:	int
+  Base:	(i_50 + 1) * m_25(D) + l_26(D)
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_3
+  Type:	long unsigned int
+  Base:	(long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)
+  Step:	(long unsigned int) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_4
+  Type:	long unsigned int
+  Base:	((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4
+  Step:	(long unsigned int) m_25(D) * 4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_5
+  Type:	float *
+  Base:	vector_27(D) + ((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4
+  Step:	(long unsigned int) m_25(D) * 4
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_11
+  Type:	int
+  Base:	(i_50 + 1) * m_25(D) + i_50
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_12
+  Type:	sizetype
+  Base:	(sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50
+  Step:	(sizetype) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_13
+  Type:	sizetype
+  Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1
+  Step:	(sizetype) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_14
+  Type:	sizetype
+  Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+  Step:	(sizetype) m_25(D) * 4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	j_30
+  Type:	int
+  Base:	i_50 + 2
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	j_51
+  Type:	int
+  Base:	i_50 + 1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_71
+  Type:	sizetype
+  Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) * 4
+  Step:	(sizetype) m_25(D) * 4
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_72
+  Type:	sizetype
+  Base:	(sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50
+  Step:	(sizetype) m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+
+<IV Groups>:
+Group 0:
+  Type:	REFERENCE ADDRESS
+  Use 0.0:
+    At stmt:	t_28 = *_5;
+    At pos:	*_5
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + ((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4
+      Step:	(long unsigned int) m_25(D) * 4
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 1:
+  Type:	COMPARE
+  Use 1.0:
+    At stmt:	if (n_23(D) > j_30)
+    At pos:	j_30
+    IV struct:
+      Type:	int
+      Base:	i_50 + 2
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 2:
+  Type:	GENERIC
+  Use 2.0:
+    At stmt:	_14 = _13 * 4;
+    At pos:	
+    IV struct:
+      Type:	sizetype
+      Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+      Step:	(sizetype) m_25(D) * 4
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 3:
+  Type:	GENERIC
+  Use 3.0:
+    At stmt:	_71 = _72 * 4;
+    At pos:	
+    IV struct:
+      Type:	sizetype
+      Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) * 4
+      Step:	(sizetype) m_25(D) * 4
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.29
+  Var after: ivtmp.29
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.30
+  Var after: ivtmp.30
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.31
+  Var after: ivtmp.31
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	(sizetype) (i_50 + 2)
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Var befor: ivtmp.32
+  Var after: ivtmp.32
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	(sizetype) (i_50 + 1)
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	i_50 + 1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.33
+  Var after: ivtmp.33
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + ((long unsigned int) ((i_50 + 1) * m_25(D)) + (long unsigned int) l_26(D)) * 4)
+    Step:	(unsigned long) ((long unsigned int) m_25(D) * 4)
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.34
+  Var after: ivtmp.34
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) (i_50 + 2)
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 7:
+  Var befor: ivtmp.35
+  Var after: ivtmp.35
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) i_50
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 8:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.36
+  Var after: ivtmp.36
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	(((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) + 1) * 4
+    Step:	(sizetype) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 9:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.37
+  Var after: ivtmp.37
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) * 4
+    Step:	(sizetype) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 10:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.38
+  Var after: ivtmp.38
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	0
+    Step:	(long unsigned int) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+<Important Candidates>:	 0, 1, 2, 3, 4,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3, 4, 5, 10
+  Group 1:	0, 1, 2, 3, 4, 6, 7
+  Group 2:	0, 1, 2, 3, 4, 8, 9, 10
+  Group 3:	0, 1, 2, 3, 4, 9, 10
+
+<Candidate Costs>:
+  cand	cost
+  0	5
+  1	5
+  2	6
+  3	6
+  4	4
+  5	9
+  6	5
+  7	5
+  8	10
+  9	9
+  10	5
+
+Scaling cost based on bb prob by 8.00: 6 (scratch: 2) -> 34
+Scaling cost based on bb prob by 8.00: 4 (scratch: 0) -> 32
+Scaling cost based on bb prob by 8.00: 0 (scratch: 0) -> 0
+Scaling cost based on bb prob by 8.00: 8 (scratch: 4) -> 36
+
+<Invariant Vars>:
+Inv 6:	_7
+Inv 8:	_10
+Inv 7:	n_23(D)	(eliminable)
+Inv 1:	j_24	(eliminable)
+Inv 2:	m_25(D)	(eliminable)
+Inv 3:	l_26(D)	(eliminable)
+Inv 4:	vector_27(D)
+Inv 5:	i_50	(eliminable)
+Inv 9:	_87
+
+<Invariant Expressions>:
+inv_expr 1: 	(long unsigned int) m_25(D) * 4
+inv_expr 2: 	(((unsigned long) l_26(D) * 4 + (unsigned long) vector_27(D)) - (unsigned long) i_50 * 4) + 18446744073709551612
+inv_expr 3: 	((unsigned long) l_26(D) * 4 + (unsigned long) vector_27(D)) - (unsigned long) i_50 * 4
+inv_expr 4: 	((unsigned long) ((i_50 + 1) * m_25(D)) + (unsigned long) l_26(D)) * 4 + (unsigned long) vector_27(D)
+inv_expr 5: 	((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967295
+inv_expr 6: 	(signed int) i_50 + 1
+inv_expr 7: 	(unsigned long) (((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967294) + 1
+inv_expr 8: 	((sizetype) i_50 + (sizetype) (((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967294)) + 3
+inv_expr 9: 	((sizetype) i_50 + (sizetype) (((unsigned int) n_23(D) - (unsigned int) i_50) + 4294967294)) + 2
+inv_expr 10: 	(((signed long) i_50 * 4 - (signed long) vector_27(D)) - (signed long) l_26(D) * 4) + 4
+inv_expr 11: 	(((signed long) ((i_50 + 1) * m_25(D)) + (signed long) i_50) + 1) * 4
+inv_expr 12: 	((signed long) i_50 * 4 - (signed long) vector_27(D)) - (signed long) l_26(D) * 4
+inv_expr 13: 	((signed long) ((i_50 + 1) * m_25(D)) + (signed long) i_50) * 4
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  5	1	0	NIL;	NIL;
+  8	9	0	2;	NIL;
+  9	8	0	3;	NIL;
+  10	10	0	4;	NIL;
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	5;	NIL;
+  1	2	0	7;	NIL;
+  2	3	0	8;	NIL;
+  3	0	0	NIL;	7
+  4	0	0	NIL;	7
+  6	0	0	NIL;	7
+  7	0	0	NIL;	7
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  5	7	0	10;	NIL;
+  8	0	0	NIL;	NIL;
+  9	4	0	NIL;	NIL;
+  10	9	0	11;	NIL;
+
+Group 3:
+  cand	cost	compl.	inv.expr.	inv.vars
+  5	34	0	12;	NIL;
+  8	32	0	NIL;	NIL;
+  9	0	0	NIL;	NIL;
+  10	36	0	13;	NIL;
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 4
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	111
+  20	116
+  21	121
+  22	126
+  23	151
+  24	176
+  25	201
+  26	226
+  27	275
+  28	324
+  29	373
+  30	422
+  31	471
+  32	520
+  33	569
+  34	618
+  35	667
+  36	716
+  37	765
+  38	814
+  39	863
+  40	912
+  41	961
+  42	1010
+  43	1059
+  44	1108
+  45	1157
+  46	1206
+  47	1255
+  48	1304
+  49	1353
+  50	1402
+  51	1451
+  52	1500
+
+Initial set of candidates:
+  cost: 63 (complexity 0)
+  reg_cost: 8
+  cand_cost: 13
+  cand_group_cost: 42 (complexity 0)
+  candidates: 4, 5
+   group:0 --> iv_cand:5, cost=(1,0)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:5, cost=(7,0)
+   group:3 --> iv_cand:5, cost=(34,0)
+  invariant variables: 7
+  invariant expressions: 1, 10, 12
+
+Improved to:
+  cost: 32 (complexity 0)
+  reg_cost: 7
+  cand_cost: 13
+  cand_group_cost: 12 (complexity 0)
+  candidates: 4, 9
+   group:0 --> iv_cand:9, cost=(8,0)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:9, cost=(4,0)
+   group:3 --> iv_cand:9, cost=(0,0)
+  invariant variables: 7
+  invariant expressions: 1, 3
+
+Initial set of candidates:
+  cost: 32 (complexity 0)
+  reg_cost: 7
+  cand_cost: 13
+  cand_group_cost: 12 (complexity 0)
+  candidates: 4, 9
+   group:0 --> iv_cand:9, cost=(8,0)
+   group:1 --> iv_cand:4, cost=(0,0)
+   group:2 --> iv_cand:9, cost=(4,0)
+   group:3 --> iv_cand:9, cost=(0,0)
+  invariant variables: 7
+  invariant expressions: 1, 3
+
+Original cost 32 (complexity 0)
+
+Final cost 32 (complexity 0)
+
+Selected IV set for loop 2 at fp_foo.c:9, 10 avg niters, 2 IVs:
+Candidate 4:
+  Var befor: j_51
+  Var after: j_30
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	i_50 + 1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 9:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.37_69
+  Var after: ivtmp.37_68
+  Incr POS: before exit test
+  IV struct:
+    Type:	sizetype
+    Base:	((sizetype) ((i_50 + 1) * m_25(D)) + (sizetype) i_50) * 4
+    Step:	(sizetype) m_25(D) * 4
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+Replacing exit test: if (n_23(D) > j_30)
+;;
+;; Loop 1
+;;  header 4, latch 11
+;;  depth 1, outer 0, finite_p
+;;  niter (unsigned int) n_23(D) + 4294967294
+;;  upper_bound 2147483645
+;;  likely_upper_bound 2147483645
+;;  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900)
+;;  nodes: 4 11 5 15 17 9 8 13 7 12 6
+Processing loop 1 at fp_foo.c:8
+  single exit 5 -> 16, exit condition if (j_24 < _45)
+
+
+
+Loops in function: dgefa
+loop_0 (header = 0, latch = 1)
+{
+  bb_2 (preds = {bb_0 }, succs = {bb_10 bb_14 })
+  {
+    <bb 2> [local count: 1804255]:
+    _45 = n_23(D) + -1;
+    if (n_23(D) > 1)
+      goto <bb 10>; [89.00%]
+    else
+      goto <bb 14>; [11.00%]
+
+  }
+  bb_14 (preds = {bb_2 }, succs = {bb_3 })
+  {
+    <bb 14> [local count: 198468]:
+
+  }
+  bb_3 (preds = {bb_14 bb_16 }, succs = {bb_1 })
+  {
+    <bb 3> [local count: 1804255]:
+    # .MEM_88 = PHI <.MEM_22(D)(14), .MEM_53(16)>
+    # VUSE <.MEM_88>
+    return;
+
+  }
+  bb_10 (preds = {bb_2 }, succs = {bb_4 })
+  {
+    <bb 10> [local count: 1605787]:
+
+  }
+  bb_16 (preds = {bb_5 }, succs = {bb_3 })
+  {
+    <bb 16> [local count: 1605787]:
+    # .MEM_53 = PHI <.MEM_89(5)>
+    goto <bb 3>; [100.00%]
+
+  }
+  loop_1 (header = 4, latch = 11, finite_p
+  niter (unsigned int) n_23(D) + 4294967294
+  upper_bound 2147483645
+  likely_upper_bound 2147483645
+  iterations by profile: 8.090909 (unreliable, maybe flat) entry count:1605787 (estimated locally, freq 0.8900))
+  {
+    bb_4 (preds = {bb_11 bb_10 }, succs = {bb_6 bb_15 })
+    {
+      <bb 4> [local count: 14598063]:
+      # i_50 = PHI <j_24(11), 0(10)>
+      # .MEM_54 = PHI <.MEM_89(11), .MEM_22(D)(10)>
+      j_24 = i_50 + 1;
+      if (n_23(D) > j_24)
+        goto <bb 6>; [89.00%]
+      else
+        goto <bb 15>; [11.00%]
+
+    }
+    bb_15 (preds = {bb_4 }, succs = {bb_5 })
+    {
+      <bb 15> [local count: 1605787]:
+
+    }
+    bb_5 (preds = {bb_15 bb_17 }, succs = {bb_11 bb_16 })
+    {
+      <bb 5> [local count: 14598063]:
+      # .MEM_89 = PHI <.MEM_54(15), .MEM_86(17)>
+      if (j_24 < _45)
+        goto <bb 11>; [89.00%]
+      else
+        goto <bb 16>; [11.00%]
+
+    }
+    bb_11 (preds = {bb_5 }, succs = {bb_4 })
+    {
+      <bb 11> [local count: 12992276]:
+      goto <bb 4>; [100.00%]
+
+    }
+    bb_6 (preds = {bb_4 }, succs = {bb_7 })
+    {
+      <bb 6> [local count: 12992276]:
+      _6 = m_25(D) * i_50;
+      _7 = _6 + i_50;
+      _8 = (sizetype) _7;
+      _9 = _8 + 1;
+      _10 = _9 * 4;
+      _87 = n_23(D) - j_24;
+      _67 = (sizetype) m_25(D);
+      _66 = _67 * 4;
+      _64 = i_50 + 1;
+      _63 = m_25(D) * _64;
+      _62 = (sizetype) _63;
+      _61 = (sizetype) i_50;
+      _60 = _61 + _62;
+      ivtmp.37_65 = _60 * 4;
+
+    }
+    bb_17 (preds = {bb_9 }, succs = {bb_5 })
+    {
+      <bb 17> [local count: 12992276]:
+      # .MEM_86 = PHI <.MEM_55(9)>
+      goto <bb 5>; [100.00%]
+
+    }
+    loop_2 (header = 7, latch = 12, finite_p
+    niter ((unsigned int) n_23(D) - (unsigned int) i_50) - 2
+    upper_bound 2147483645
+    likely_upper_bound 2147483645
+    iterations by profile: 8.090909 (unreliable, maybe flat) entry count:12992276 (estimated locally, freq 7.2009))
+    {
+      bb_7 (preds = {bb_12 bb_6 }, succs = {bb_8 })
+      {
+        <bb 7> [local count: 118111600]:
+        # j_51 = PHI <j_30(12), j_24(6)>
+        # .MEM_52 = PHI <.MEM_55(12), .MEM_54(6)>
+        # ivtmp.37_69 = PHI <ivtmp.37_68(12), ivtmp.37_65(6)>
+        _1 = m_25(D) * j_51;
+        _2 = _1 + l_26(D);
+        _3 = (long unsigned int) _2;
+        _4 = _3 * 4;
+        _5 = vector_27(D) + _4;
+        _59 = (sizetype) i_50;
+        _58 = _59 * 18446744073709551612;
+        _49 = (sizetype) l_26(D);
+        _48 = _49 * 4;
+        _47 = _48 + _58;
+        _46 = vector_27(D) + _47;
+        _44 = _46 + ivtmp.37_69;
+        # VUSE <.MEM_52>
+        t_28 = MEM[(float *)_44];
+        _11 = _1 + i_50;
+        _12 = (sizetype) _11;
+        _13 = _12 + 1;
+        _14 = ivtmp.37_69 + 4;
+        _82 = (sizetype) _7;
+        _81 = _82 + 1;
+        _80 = _81 * 4;
+        _79 = vector_27(D) + _80;
+        ivtmp.23_83 = (unsigned long) _79;
+
+      }
+      bb_9 (preds = {bb_8 }, succs = {bb_12 bb_17 })
+      {
+        <bb 9> [local count: 118111600]:
+        # .MEM_55 = PHI <.MEM_42(8)>
+        j_30 = j_51 + 1;
+        ivtmp.37_68 = ivtmp.37_69 + _66;
+        if (j_30 != n_23(D))
+          goto <bb 12>; [89.00%]
+        else
+          goto <bb 17>; [11.00%]
+
+      }
+      bb_12 (preds = {bb_9 }, succs = {bb_7 })
+      {
+        <bb 12> [local count: 105119324]:
+        goto <bb 7>; [100.00%]
+
+      }
+      loop_3 (header = 8, latch = 13, finite_p
+      niter _87 > 0 ? (unsigned int) _87 + 4294967295 : 0
+      upper_bound 2147483645
+      likely_upper_bound 2147483645
+      iterations by profile: 7.090909 (unreliable, maybe flat) entry count:118111600 (estimated locally, freq 65.4628))
+      {
+        bb_8 (preds = {bb_13 bb_7 }, succs = {bb_13 bb_9 })
+        {
+          <bb 8> [local count: 955630225]:
+          # i_56 = PHI <i_40(13), 0(7)>
+          # .MEM_57 = PHI <.MEM_42(13), .MEM_52(7)>
+          # ivtmp.23_85 = PHI <ivtmp.23_84(13), ivtmp.23_83(7)>
+          _32 = (long unsigned int) i_56;
+          _33 = _32 * 4;
+          _21 = _10 + _33;
+          _34 = vector_27(D) + _21;
+          _78 = (void *) ivtmp.23_85;
+          # VUSE <.MEM_57>
+          _35 = MEM[(float *)_78];
+          _29 = _14 + _33;
+          _36 = vector_27(D) + _29;
+          _76 = (sizetype) _7;
+          _75 = _76 * 18446744073709551612;
+          _74 = _75 + ivtmp.23_85;
+          _73 = (void *) _74;
+          _72 = (sizetype) _11;
+          _71 = ivtmp.37_69;
+          _70 = _73 + _71;
+          # VUSE <.MEM_57>
+          _37 = MEM[(float *)_70];
+          _38 = t_28 * _37;
+          _39 = _35 + _38;
+          _77 = (void *) ivtmp.23_85;
+          # .MEM_42 = VDEF <.MEM_57>
+          MEM[(float *)_77] = _39;
+          i_40 = i_56 + 1;
+          ivtmp.23_84 = ivtmp.23_85 + 4;
+          if (i_40 < _87)
+            goto <bb 13>; [89.00%]
+          else
+            goto <bb 9>; [11.00%]
+
+        }
+        bb_13 (preds = {bb_8 }, succs = {bb_8 })
+        {
+          <bb 13> [local count: 850510901]:
+          goto <bb 8>; [100.00%]
+
+        }
+      }
+    }
+  }
+}
+Analyzing # of iterations of loop 1
+  exit condition [1, + , 1](no_overflow) < n_23(D) + -1
+  bounds on difference of bases: 0 ... 2147483645
+  result:
+    # of iterations (unsigned int) n_23(D) + 4294967294, bounded by 2147483645
+  number of iterations (unsigned int) n_23(D) + 4294967294
+
+<Induction Vars>:
+IV struct:
+  SSA_NAME:	_6
+  Type:	int
+  Base:	0
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_7
+  Type:	int
+  Base:	0
+  Step:	(int) ((unsigned int) m_25(D) + 1)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	j_24
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_46
+  Type:	float *
+  Base:	vector_27(D) + (sizetype) l_26(D) * 4
+  Step:	18446744073709551612
+  Object:	(void *) vector_27(D)
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_47
+  Type:	sizetype
+  Base:	(sizetype) l_26(D) * 4
+  Step:	18446744073709551612
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	i_50
+  Type:	int
+  Base:	0
+  Step:	1
+  Biv:	Y
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_58
+  Type:	sizetype
+  Base:	0
+  Step:	18446744073709551612
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_59
+  Type:	sizetype
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_61
+  Type:	sizetype
+  Base:	0
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_63
+  Type:	int
+  Base:	m_25(D)
+  Step:	m_25(D)
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+IV struct:
+  SSA_NAME:	_64
+  Type:	int
+  Base:	1
+  Step:	1
+  Biv:	N
+  Overflowness wrto loop niter:	No-overflow
+IV struct:
+  SSA_NAME:	_87
+  Type:	int
+  Base:	n_23(D) + -1
+  Step:	-1
+  Biv:	N
+  Overflowness wrto loop niter:	Overflow
+
+<IV Groups>:
+Group 0:
+  Type:	COMPARE
+  Use 0.0:
+    At stmt:	if (n_23(D) > j_24)
+    At pos:	j_24
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 1:
+  Type:	COMPARE
+  Use 1.0:
+    At stmt:	if (j_24 < _45)
+    At pos:	j_24
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 2:
+  Type:	GENERIC
+  Use 2.0:
+    At stmt:	_7 = _6 + i_50;
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	0
+      Step:	(int) ((unsigned int) m_25(D) + 1)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 3:
+  Type:	COMPARE
+  Use 3.0:
+    At stmt:	if (i_40 < _87)
+    At pos:	_87
+    IV struct:
+      Type:	int
+      Base:	n_23(D) + -1
+      Step:	-1
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 4:
+  Type:	GENERIC
+  Use 4.0:
+    At stmt:	j_24 = i_50 + 1;
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	1
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 5:
+  Type:	GENERIC
+  Use 5.0:
+    At stmt:	_46 = vector_27(D) + _47;
+    At pos:	
+    IV struct:
+      Type:	float *
+      Base:	vector_27(D) + (sizetype) l_26(D) * 4
+      Step:	18446744073709551612
+      Object:	(void *) vector_27(D)
+      Biv:	N
+      Overflowness wrto loop niter:	No-overflow
+Group 6:
+  Type:	GENERIC
+  Use 6.0:
+    At stmt:	i_50 = PHI <j_24(11), 0(10)>
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	0
+      Step:	1
+      Biv:	Y
+      Overflowness wrto loop niter:	No-overflow
+Group 7:
+  Type:	GENERIC
+  Use 7.0:
+    At stmt:	_63 = m_25(D) * _64;
+    At pos:	
+    IV struct:
+      Type:	int
+      Base:	m_25(D)
+      Step:	m_25(D)
+      Biv:	N
+      Overflowness wrto loop niter:	Overflow
+Group 8:
+  Type:	GENERIC
+  Use 8.0:
+    At stmt:	_61 = (sizetype) i_50;
+    At pos:	
+    IV struct:
+      Type:	sizetype
+      Base:	0
+      Step:	1
+      Biv:	N
+      Overflowness wrto loop niter:	No-overflow
+
+Predict doloop failure due to target specific checks.
+Candidate 0:
+  Var befor: ivtmp.39
+  Var after: ivtmp.39
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 1:
+  Var befor: ivtmp.40
+  Var after: ivtmp.40
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 2:
+  Var befor: ivtmp.41
+  Var after: ivtmp.41
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	1
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.42
+  Var after: ivtmp.42
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	(unsigned int) m_25(D) + 1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.43
+  Var after: ivtmp.43
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) (n_23(D) + -1)
+    Step:	4294967295
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 6:
+  Var befor: ivtmp.44
+  Var after: ivtmp.44
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) n_23(D)
+    Step:	4294967295
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 7:
+  Var befor: ivtmp.45
+  Var after: ivtmp.45
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + (sizetype) l_26(D) * 4)
+    Step:	18446744073709551612
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 8:
+  Var befor: ivtmp.46
+  Var after: ivtmp.46
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) m_25(D)
+    Step:	(unsigned int) m_25(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+<Important Candidates>:	 0, 1, 2, 3,
+
+<Group, Cand> Related:
+  Group 0:	0, 1, 2, 3
+  Group 1:	0, 1, 2, 3
+  Group 2:	0, 1, 2, 3, 4
+  Group 3:	0, 1, 2, 3, 5, 6
+  Group 4:	0, 1, 2, 3
+  Group 5:	0, 1, 2, 3, 7
+  Group 6:	0, 1, 2, 3
+  Group 7:	0, 1, 2, 3, 8
+  Group 8:	0, 1, 2, 3
+
+<Candidate Costs>:
+  cand	cost
+  0	5
+  1	5
+  2	5
+  3	4
+  4	5
+  5	5
+  6	5
+  7	6
+  8	5
+
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 20.00: 0 (scratch: 0) -> 0
+Scaling cost based on bb prob by 20.00: 4 (scratch: 0) -> 80
+Scaling cost based on bb prob by 2.00: 9 (scratch: 1) -> 17
+Scaling cost based on bb prob by 2.00: 0 (scratch: 0) -> 0
+
+<Invariant Vars>:
+Inv 1:	n_23(D)
+Inv 4:	m_25(D)
+Inv 5:	l_26(D)
+Inv 3:	vector_27(D)
+Inv 2:	_45	(eliminable)
+
+<Invariant Expressions>:
+inv_expr 1: 	(unsigned int) m_25(D) + 1
+inv_expr 2: 	(signed int) n_23(D) + 1
+inv_expr 3: 	(signed int) n_23(D) + -1
+inv_expr 4: 	(signed long) l_26(D) * 4 + (signed long) vector_27(D)
+
+<Group-candidate Costs>:
+Group 0:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	4	0	NIL;	NIL;
+  1	4	0	NIL;	NIL;
+  2	0	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  5	4	0	NIL;	NIL;
+  6	4	0	2;	NIL;
+
+Group 1:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	NIL;
+  1	0	0	NIL;	2
+  2	0	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  5	0	0	NIL;	NIL;
+  6	0	0	NIL;	NIL;
+  7	3	0	NIL;	NIL;
+
+Group 2:
+  cand	cost	compl.	inv.expr.	inv.vars
+  4	0	0	NIL;	NIL;
+
+Group 3:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	80	0	3;	NIL;
+  1	80	0	3;	NIL;
+  2	80	0	NIL;	NIL;
+  3	80	0	NIL;	NIL;
+  5	0	0	NIL;	NIL;
+  6	80	0	NIL;	NIL;
+
+Group 4:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	4	0	NIL;	NIL;
+  1	4	0	NIL;	NIL;
+  2	0	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  5	4	0	NIL;	NIL;
+  6	4	0	2;	NIL;
+
+Group 5:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	17	0	4;	NIL;
+  7	0	0	NIL;	NIL;
+
+Group 6:
+  cand	cost	compl.	inv.expr.	inv.vars
+  0	0	0	NIL;	NIL;
+  1	0	0	NIL;	NIL;
+  2	4	0	NIL;	NIL;
+  3	0	0	NIL;	NIL;
+  5	4	0	3;	NIL;
+  6	4	0	NIL;	NIL;
+
+Group 7:
+  cand	cost	compl.	inv.expr.	inv.vars
+  8	0	0	NIL;	NIL;
+
+Group 8:
+  cand	cost	compl.	inv.expr.	inv.vars
+  1	0	0	NIL;	NIL;
+
+
+<Global Costs>:
+  target_avail_regs 26
+  target_clobbered_regs 16
+  target_reg_cost 4
+  target_spill_cost 24
+  regs_used 4
+  cost for size:
+  ivs	cost
+  0	0
+  1	2
+  2	4
+  3	6
+  4	8
+  5	10
+  6	12
+  7	14
+  8	16
+  9	18
+  10	20
+  11	22
+  12	24
+  13	26
+  14	28
+  15	30
+  16	32
+  17	34
+  18	36
+  19	111
+  20	116
+  21	121
+  22	126
+  23	151
+  24	176
+  25	201
+  26	226
+  27	275
+  28	324
+  29	373
+  30	422
+  31	471
+  32	520
+  33	569
+  34	618
+  35	667
+  36	716
+  37	765
+  38	814
+  39	863
+  40	912
+  41	961
+  42	1010
+  43	1059
+  44	1108
+  45	1157
+  46	1206
+  47	1255
+  48	1304
+  49	1353
+  50	1402
+  51	1451
+  52	1500
+
+Initial set of candidates:
+  cost: 126 (complexity 0)
+  reg_cost: 10
+  cand_cost: 19
+  cand_group_cost: 97 (complexity 0)
+  candidates: 1, 3, 4, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:3, cost=(80,0)
+   group:4 --> iv_cand:3, cost=(0,0)
+   group:5 --> iv_cand:1, cost=(17,0)
+   group:6 --> iv_cand:3, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 53 (complexity 0)
+  reg_cost: 12
+  cand_cost: 24
+  cand_group_cost: 17 (complexity 0)
+  candidates: 1, 3, 4, 5, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:5, cost=(0,0)
+   group:4 --> iv_cand:3, cost=(0,0)
+   group:5 --> iv_cand:1, cost=(17,0)
+   group:6 --> iv_cand:3, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 43 (complexity 0)
+  reg_cost: 13
+  cand_cost: 30
+  cand_group_cost: 0 (complexity 0)
+  candidates: 1, 3, 4, 5, 7, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:5, cost=(0,0)
+   group:4 --> iv_cand:3, cost=(0,0)
+   group:5 --> iv_cand:7, cost=(0,0)
+   group:6 --> iv_cand:3, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Initial set of candidates:
+  cost: 55 (complexity 0)
+  reg_cost: 10
+  cand_cost: 20
+  cand_group_cost: 25 (complexity 0)
+  candidates: 1, 4, 5, 8
+   group:0 --> iv_cand:5, cost=(4,0)
+   group:1 --> iv_cand:5, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:5, cost=(0,0)
+   group:4 --> iv_cand:5, cost=(4,0)
+   group:5 --> iv_cand:1, cost=(17,0)
+   group:6 --> iv_cand:1, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1, 4
+
+Improved to:
+  cost: 45 (complexity 0)
+  reg_cost: 11
+  cand_cost: 26
+  cand_group_cost: 8 (complexity 0)
+  candidates: 1, 4, 5, 7, 8
+   group:0 --> iv_cand:5, cost=(4,0)
+   group:1 --> iv_cand:5, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:5, cost=(0,0)
+   group:4 --> iv_cand:5, cost=(4,0)
+   group:5 --> iv_cand:7, cost=(0,0)
+   group:6 --> iv_cand:1, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Improved to:
+  cost: 43 (complexity 0)
+  reg_cost: 13
+  cand_cost: 30
+  cand_group_cost: 0 (complexity 0)
+  candidates: 1, 3, 4, 5, 7, 8
+   group:0 --> iv_cand:3, cost=(0,0)
+   group:1 --> iv_cand:3, cost=(0,0)
+   group:2 --> iv_cand:4, cost=(0,0)
+   group:3 --> iv_cand:5, cost=(0,0)
+   group:4 --> iv_cand:3, cost=(0,0)
+   group:5 --> iv_cand:7, cost=(0,0)
+   group:6 --> iv_cand:3, cost=(0,0)
+   group:7 --> iv_cand:8, cost=(0,0)
+   group:8 --> iv_cand:1, cost=(0,0)
+  invariant variables: 
+  invariant expressions: 1
+
+Original cost 43 (complexity 0)
+
+Final cost 43 (complexity 0)
+
+Selected IV set for loop 1 at fp_foo.c:8, 10 avg niters, 6 IVs:
+Candidate 1:
+  Var befor: ivtmp.40_43
+  Var after: ivtmp.40_41
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 3:
+  Var befor: i_50
+  Var after: j_24
+  Incr POS: orig biv
+  IV struct:
+    Type:	int
+    Base:	0
+    Step:	1
+    Biv:	N
+    Overflowness wrto loop niter:	No-overflow
+Candidate 4:
+  Depend on inv.exprs: 1
+  Var befor: ivtmp.42_31
+  Var after: ivtmp.42_20
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	0
+    Step:	(unsigned int) m_25(D) + 1
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 5:
+  Var befor: ivtmp.43_17
+  Var after: ivtmp.43_16
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) (n_23(D) + -1)
+    Step:	4294967295
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 7:
+  Var befor: ivtmp.45_91
+  Var after: ivtmp.45_92
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned long
+    Base:	(unsigned long) (vector_27(D) + (sizetype) l_26(D) * 4)
+    Step:	18446744073709551612
+    Object:	(void *) vector_27(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+Candidate 8:
+  Var befor: ivtmp.46_97
+  Var after: ivtmp.46_98
+  Incr POS: before exit test
+  IV struct:
+    Type:	unsigned int
+    Base:	(unsigned int) m_25(D)
+    Step:	(unsigned int) m_25(D)
+    Biv:	N
+    Overflowness wrto loop niter:	Overflow
+
+Replacing exit test: if (j_24 < _45)
diff --git a/gcc/testsuite/fp_foo.c b/gcc/testsuite/fp_foo.c
new file mode 100644
index 00000000000..f65f43d6435
--- /dev/null
+++ b/gcc/testsuite/fp_foo.c
@@ -0,0 +1,19 @@
+
+void daxpy(float *vector1, float *vector2, int n, float fp_const){
+	for (int i = 0; i < n; ++i)
+		vector1[i] += fp_const * vector2[i];
+}
+
+void dgefa(float *vector, int m, int n, int l){
+	for (int i = 0; i < n - 1; ++i){
+		for (int j = i + 1; j < n; ++j){
+			float t = vector[m * j + l];
+			daxpy(&vector[m * i + i + 1],
+                              &vector[m * j + i + 1], n - (i + 1), t);
+		}
+	}
+}
+
+int main(){
+  return 0;
+}
diff --git a/gcc/testsuite/test_script.sh b/gcc/testsuite/test_script.sh
new file mode 100644
index 00000000000..4f19d248efe
--- /dev/null
+++ b/gcc/testsuite/test_script.sh
@@ -0,0 +1,10 @@
+export PREFIX="/home/syrmia/Desktop/Aleksandar/GNU_toolchain/install"
+export SOURCE_DIR="/home/syrmia/Desktop/Aleksandar/GNU_toolchain/source"
+export BUILD_DIR="/home/syrmia/Desktop/Aleksandar/GNU_toolchain/build"
+export SYSROOT="/home/syrmia/Desktop/Aleksandar/GNU_toolchain/install/sys_root"
+export PATH=$PREFIX/bin:$PATH
+export TARGET=mips64-r6-linux-gnu
+
+
+$PREFIX/bin/mips64-r6-linux-gnu-gcc fp_foo.c -O2 >out.txt -S -o fp_foo.s -march=mips64r6 -mabi=64
+
diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc
index 7cae5bdefea..2dec5001dca 100644
--- a/gcc/tree-ssa-loop-ivopts.cc
+++ b/gcc/tree-ssa-loop-ivopts.cc
@@ -4724,7 +4724,8 @@ get_address_cost (struct ivopts_data *data, struct iv_use *use,
   rtx addr;
   bool simple_inv = true;
   tree comp_inv = NULL_TREE, type = aff_var->type;
-  comp_cost var_cost = no_cost, cost = no_cost;
+  comp_cost var_cost = no_cost, cost = no_cost, autoinc_cost = no_cost;
+  comp_cost acost = no_cost;
   struct mem_address parts = {NULL_TREE, integer_one_node,
 			      NULL_TREE, NULL_TREE, NULL_TREE};
   machine_mode addr_mode = TYPE_MODE (type);
@@ -4755,38 +4756,36 @@ get_address_cost (struct ivopts_data *data, struct iv_use *use,
 	  if (!ok_with_ratio_p)
 	    parts.step = NULL_TREE;
 	}
-      if (ok_with_ratio_p || ok_without_ratio_p)
+      if (!(ok_with_ratio_p || ok_without_ratio_p))
+    parts.index = NULL_TREE;
+
+      if (maybe_ne (aff_inv->offset, 0))
 	{
-	  if (maybe_ne (aff_inv->offset, 0))
-	    {
-	      parts.offset = wide_int_to_tree (sizetype, aff_inv->offset);
-	      /* Addressing mode "base + index [<< scale] + offset".  */
-	      if (!valid_mem_ref_p (mem_mode, as, &parts, code))
-		parts.offset = NULL_TREE;
-	      else
-		aff_inv->offset = 0;
-	    }
+	  parts.offset = wide_int_to_tree (sizetype, aff_inv->offset);
+	  /* Addressing mode "base + index[<< scale] + offset".  */
+	  if (!valid_mem_ref_p (mem_mode, as, &parts, code))
+	    parts.offset = NULL_TREE;
+	  else
+	    aff_inv->offset = 0;
+	}
 
-	  move_fixed_address_to_symbol (&parts, aff_inv);
-	  /* Base is fixed address and is moved to symbol part.  */
-	  if (parts.symbol != NULL_TREE && aff_combination_zero_p (aff_inv))
-	    parts.base = NULL_TREE;
+      move_fixed_address_to_symbol (&parts, aff_inv);
+      /* Base is fixed address and is moved to symbol part.  */
+      if (parts.symbol != NULL_TREE && aff_combination_zero_p (aff_inv))
+    parts.base = NULL_TREE;
 
-	  /* Addressing mode "symbol + base + index [<< scale] [+ offset]".  */
-	  if (parts.symbol != NULL_TREE
-	      && !valid_mem_ref_p (mem_mode, as, &parts, code))
-	    {
-	      aff_combination_add_elt (aff_inv, parts.symbol, 1);
-	      parts.symbol = NULL_TREE;
-	      /* Reset SIMPLE_INV since symbol address needs to be computed
-		 outside of address expression in this case.  */
-	      simple_inv = false;
-	      /* Symbol part is moved back to base part, it can't be NULL.  */
-	      parts.base = integer_one_node;
-	    }
+      /* Addressing mode "symbol + base + index[<< scale] [+ offset]".  */
+      if (parts.symbol != NULL_TREE
+	   && !valid_mem_ref_p (mem_mode, as, &parts, code))
+	{
+	  aff_combination_add_elt (aff_inv, parts.symbol, 1);
+	  parts.symbol = NULL_TREE;
+	  /* Reset SIMPLE_INV since symbol address needs to be computed
+ outside of address expression in this case.  */
+	  simple_inv = false;
+	 /* Symbol part is moved back to base part, it can't be NULL.  */
+	  parts.base = integer_one_node;
 	}
-      else
-	parts.index = NULL_TREE;
     }
   else
     {
@@ -4799,14 +4798,12 @@ get_address_cost (struct ivopts_data *data, struct iv_use *use,
 
 	  if (stmt_after_increment (data->current_loop, cand, use->stmt))
 	    ainc_offset += ainc_step;
-	  cost = get_address_cost_ainc (ainc_step, ainc_offset,
+	  autoinc_cost = get_address_cost_ainc (ainc_step, ainc_offset,
 					addr_mode, mem_mode, as, speed);
-	  if (!cost.infinite_cost_p ())
-	    {
-	      *can_autoinc = true;
-	      return cost;
-	    }
-	  cost = no_cost;
+	  if (!autoinc_cost.infinite_cost_p ())
+	    *can_autoinc = true;
+	  else
+	    autoinc_cost = no_cost;
 	}
       if (!aff_combination_zero_p (aff_inv))
 	{
@@ -4852,10 +4849,13 @@ get_address_cost (struct ivopts_data *data, struct iv_use *use,
   cost += var_cost;
   addr = addr_for_mem_ref (&parts, as, false);
   gcc_assert (memory_address_addr_space_p (mem_mode, addr, as));
-  cost += address_cost (addr, mem_mode, as, speed);
+  acost += address_cost (addr, mem_mode, as, speed);
 
   if (parts.symbol != NULL_TREE)
     cost.complexity += 1;
+  /* var_present.  */
+  else if (!aff_combination_const_p (aff_inv))
+    cost.complexity += 1;
   /* Don't increase the complexity of adding a scaled index if it's
      the only kind of index that the target allows.  */
   if (parts.step != NULL_TREE && ok_without_ratio_p)
@@ -4865,6 +4865,7 @@ get_address_cost (struct ivopts_data *data, struct iv_use *use,
   if (parts.offset != NULL_TREE && !integer_zerop (parts.offset))
     cost.complexity += 1;
 
+  cost += (can_autoinc && *can_autoinc) ? autoinc_cost : acost;
   return cost;
 }
 
-- 
2.34.1

             reply	other threads:[~2024-03-18 20:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 20:27 Aleksandar Rakic [this message]
2024-03-27 11:21 ` [PING] " Aleksandar Rakic
2024-04-15 13:30 ` Aleksandar Rakic
  -- strict thread matches above, loose matches on Subject: below --
2024-03-18 11:28 Aleksandar Rakic
2022-10-21 13:52 [PATCH 0/2] ivopts: Fix candidate selection for architectures with limited addressing modes Dimitrije Milosevic
2022-10-21 13:52 ` [PATCH 1/2] ivopts: Revert computation of address cost complexity Dimitrije Milosevic
2022-10-25 11:08   ` Richard Biener
2022-10-25 13:00     ` Dimitrije Milosevic
2022-10-27 23:02   ` Jeff Law
2022-10-28  6:43     ` Dimitrije Milosevic
2022-10-28  7:00       ` Richard Biener
2022-10-28 13:39         ` Dimitrije Milosevic
2022-11-01 18:46         ` Jeff Law
2022-11-02  8:40           ` Dimitrije Milosevic
2022-11-07 13:35             ` Richard Biener
2022-12-15 15:26               ` Dimitrije Milosevic
2022-12-16  9:58                 ` Richard Biener
2022-12-16 11:37                   ` Dimitrije Milosevic
2022-12-16 11:58                     ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR03MB46111886C381E0CF7DB0459EFC2D2@AM0PR03MB4611.eurprd03.prod.outlook.com \
    --to=aleksandar.rakic@syrmia.com \
    --cc=Djordje.Todorovic@syrmia.com \
    --cc=Jovan.Dmitrovic@Syrmia.com \
    --cc=Uros.Beric@Syrmia.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).