https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115248

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The first (major) difference in the IR (besides the original removal of
statements) come from threadfull1. 

trunk:
```
 Registering killing_def (path_oracle) distbb_72
 Registering killing_def (path_oracle) distij_71
 Registering killing_def (path_oracle) x_70
 Registering killing_def (path_oracle) _15
 folding with relation x_70 == x_70
Checking profitability of path (backwards): 
  [10] Registering jump thread: (16, 18) incoming edge;  (18, 20) nocopy; 
path: 16->18->20 SUCCESS
Checking profitability of path (backwards):  bb:20 (4 insns) bb:18
  Control statement insns: 2
  Overall: 2 insns
```

Before:
```
 Registering killing_def (path_oracle) distbb_73
 Registering killing_def (path_oracle) distij_72
 Registering killing_def (path_oracle) x_71
 Registering killing_def (path_oracle) _15
 folding with relation x_71 == x_71
 Registering value_relation (path_oracle) (elcdst_35 <= distbb_73) (root: bb16)
path: 16->18->xx REJECTED
Checking profitability of path (backwards):  bb:18 (2 insns) bb:16 (6 insns)
bb:23
  Control statement insns: 2
  Overall: 6 insns

 Registering killing_def (path_oracle) _15
 Registering killing_def (path_oracle) x_71
 Registering killing_def (path_oracle) distij_72
 folding with relation x_71 == x_71
 Registering killing_def (path_oracle) distbb_73
 Registering value_relation (path_oracle) (elcdst_35 <= distbb_73) (root: bb23)
path: 23->16->18->xx REJECTED
Checking profitability of path (backwards):  bb:18 (2 insns) bb:16 (6 insns)
bb:23 (2 insns) bb:15
  Control statement insns: 2
  Overall: 8 insns
  FAIL: Did not thread around loop and would copy too many statements.
Checking profitability of path (backwards):  bb:18 (2 insns) bb:16 (6 insns)
bb:23 (2 insns) bb:22 (latch)
  Control statement insns: 2
  Overall: 8 insns
  FAIL: Did not thread around loop and would copy too many statements.
Checking profitability of path (backwards):  bb:20 (4 insns) bb:18
  Control statement insns: 2
  Overall: 2 insns
```

I don't understand how if the IR coming in is basically the same (just
different underlying decl for the ssa_name) would make a difference like this.
Seems like there is some costing difference for temporaries vs non-temporaries
which should NOT happen.

Reply via email to