https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #18 from Bill Schmidt ---
In the before case, it appears that later optimization is able to remove the
i_12 add by adjusting the loop counter. After ivopts:
i_12 = i_5 + 4;
ivtmp.10_17 = ivtmp.10_18 + 32;
Before SMS:
r174 =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #17 from Bill Schmidt ---
Sure. My point is that the modeling that's being done doesn't accurately
predict the actual loop performance. What we need to do is figure out why.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #16 from amker at gcc dot gnu.org ---
(In reply to Bill Schmidt from comment #15)
> It's a bit shift, but the result is still that it is now in the loop instead
> of outside the loop, and the total cost of the loop has increased.
But
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #15 from Bill Schmidt ---
It's a bit shift, but the result is still that it is now in the loop instead of
outside the loop, and the total cost of the loop has increased.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #14 from amker at gcc dot gnu.org ---
(In reply to Bill Schmidt from comment #13)
> Actually it appears that the IVOPTS change results in worse code going into
> SMS, regardless of whether SMS can succeed on the loop. It comes down
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #13 from Bill Schmidt ---
Actually it appears that the IVOPTS change results in worse code going into
SMS, regardless of whether SMS can succeed on the loop. It comes down to the
fact that IVOPTS formerly pulled a multiply
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #12 from Bill Schmidt ---
It's not clear yet what we should do with this. It looks like SMS is able to
figure out that the sign-extension is not needed in the pre-r247885 code, but
can't sort this out with the IVOPTS change. The
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #11 from Segher Boessenkool ---
In the 64-bit Power ABIs, an int is passed as a sign-extended 64-bit register.
Take this trivial example:
int f(int x) { return x*x; }
which compiles to (on powerpc64-linux, BE):
.L.f:
mullw
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #10 from amker at gcc dot gnu.org ---
(In reply to Segher Boessenkool from comment #9)
> Either r160 should be SImode, or we should copy it to a SImode pseudo
> and use that instead throughout? Do we want to use it as DImode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
Segher Boessenkool changed:
What|Removed |Added
CC||segher at gcc dot gnu.org
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #8 from amker at gcc dot gnu.org ---
So whole expanded rtl is:
;;
;; Full RTL generated for this function:
;;
1: NOTE_INSN_DELETED
5: NOTE_INSN_BASIC_BLOCK 2
2: r160:DI=%3:DI
3: NOTE_INSN_FUNCTION_BEG
4:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #7 from amker at gcc dot gnu.org ---
So dump of optimized pass is:
;; Function f (f, funcdef_no=0, decl_uid=2557, cgraph_uid=0, symbol_order=1)
Removing basic block 5
__attribute__((noinline))
f (int m)
{
int sh;
int i;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #6 from amker at gcc dot gnu.org ---
So before the change, ivotps dump is like:
[15.00%]:
_15 = (unsigned int) m_8(D);
ivtmp.10_16 = _15 * 8;
[100.00%]:
# i_5 = PHI
# sh_6 = PHI <256(2), sh_10(4)>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #5 from seurer at gcc dot gnu.org ---
FYI: I am testing on native powerpc64 hardware and tried this on both power7
and power8 systems.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #4 from seurer at gcc dot gnu.org ---
I am using a very simple configuration:
--enable-languages=c,fortran,c++ --with-cpu=power8 --disable-bootstrap
I tried it without specifying a cpu as well and got the same results.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #3 from amker at gcc dot gnu.org ---
(In reply to Aldy Hernandez from comment #2)
> Confirmed. Any update on this amker?
>
> Started with:
>
> commit a9b41911523c1db8042f1f38d1ed814326ef
> Author: amker
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
Aldy Hernandez changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #1 from amker at gcc dot gnu.org ---
Sorry for causing this, I will investigate.
Thanks,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
20 matches
Mail list logo