[Bug rtl-optimization/55583] Extended shift instruction on x86-64 is not used, producing unoptimal code
mikko.markus.torni at iki dot fi
gcc-bugzilla@gcc.gnu.org
Tue Dec 4 01:04:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55583
Mikko Markus Torni <mikko.markus.torni at iki dot fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28866|0 |1
is obsolete| |
--- Comment #3 from Mikko Markus Torni <mikko.markus.torni at iki dot fi> 2012-12-04 01:03:44 UTC ---
Created attachment 28868
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28868
Source code demonstrating code generated (updated)
Bug fixes in signed integer testcases.
Clang 3.0 seems to produce optimal looking code in the following test cases:
test32rn testu64l testu32l testu16l testu64ln testu64rn testu32ln testu32rn
Clang 3.0 manages to use shld/shrd, but generates extra moves in the following
test cases:
test64r test32r test16r test64rn test32rn testu64rn testu32r testu16r
Clang 3.0 fails to use shld/shrd in the following test cases:
test64l test32l test16l test64ln test32ln test16ln test16rn testu16ln
testu16rn
Tested with clang:
"/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -S -disable-free
-disable-llvm-verifier -main-file-name gcc_shld_not_used.c -mrelocation-model
static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -target-linker-version 2.22 -momit-leaf-frame-pointer -v
-coverage-file gcc_shld_not_used.s -resource-dir /usr/bin/../lib/clang/3.0 -O2
-Wall -W -ferror-limit 19 -fmessage-length 0 -fgnu-runtime
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi
-fdiagnostics-show-option -o gcc_shld_not_used.s -x cpp-output
gcc_shld_not_used.i
clang -cc1 version 3.0 based upon llvm 3.0 hosted on x86_64-pc-linux-gnu
More information about the Gcc-bugs
mailing list