This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/77499] [7 Regression] Regression after code-hoisting, due to combine pass failing to evaluate known value range
- From: "avieira at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Sep 2016 08:42:44 +0000
- Subject: [Bug rtl-optimization/77499] [7 Regression] Regression after code-hoisting, due to combine pass failing to evaluate known value range
- Auto-submitted: auto-generated
- References: <bug-77499-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77499
--- Comment #11 from avieira at gcc dot gnu.org ---
(In reply to Segher Boessenkool from comment #10)
> That is what nonzero_bits etc. is about. We could do much better nowadays
> with the generic DF framework.
>
I am not familiar with the generic DF framework, could you point me to it?
> Is code hoisting making the code better at all here? (At RTL level)
Not as is, but I was hoping that if the zero_extend gets removed, we could end
up with:
movw r6, #45345
.L4:
smull r5, r4, r7, r1
lsrs r0, r0, #1
sub r4, r4, r1, asr #31
- eor r5, r0, r6
add r4, r4, r4, lsl #1
cmp r1, r4
sub r1, r1, r3
it ne
- uxthne r0, r5
+ eorne r0, r0, r6
cmp r2, r1
blt .L4
So compared to the no-code-hoisting case it would realize it needs to do the
same shift in both cases and only do it once.