This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/49799] gcc arm generates illegal sbfx instruction
- From: "carrot at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jul 2011 09:26:28 +0000
- Subject: [Bug rtl-optimization/49799] gcc arm generates illegal sbfx instruction
- Auto-submitted: auto-generated
- References: <bug-49799-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49799
--- Comment #6 from Carrot <carrot at google dot com> 2011-07-25 09:25:22 UTC ---
(In reply to comment #5)
> We should never generate a shift of -1. Instead the code that does that should
> return (clobber const_int 0).
I'm afraid this method may impact gcc too much. I added the following to the
source code
K[1] = K[1] << -1;
gcc only generates a warning
auto_corr_to_refl_coef.i:19:5: warning: left shift count is negative [enabled
by default]
and generates following code
ldrsh r1, [r0, #2]
mvn ip, #0
mov r1, r1, asl ip
strh r1, [r0, #2]
What do you think?