https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67325
Bug ID: 67325
Summary: Optimize shift (aka subreg) of load to simple load
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
Target Milestone: ---
Target: x86_64-linux-gnu
int f(long*l){
return *l>>32;
}
movq (%rdi), %rax
sarq $32, %rax
While it seems to me that a single movl would do.
Classified as target (x86_64) for now, but it is more likely tree-optimization
or rtl-optimization.