Summary: | compiler fails to coalesce loads/stores | ||
---|---|---|---|
Product: | gcc | Reporter: | Rahul Kharche <rkharche> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | icera-sdkteam-gnu, jamborm, mjambor, rkharche, vda.linux |
Priority: | P3 | ||
Version: | 4.5.1 | ||
Target Milestone: | --- | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | ||
Bug Depends on: | 23684 | ||
Bug Blocks: | |||
Attachments: | Patch Vs 4.5.2 Rev 167088 |
Description
Rahul Kharche
2010-12-24 11:01:32 UTC
Created attachment 22974 [details]
Patch Vs 4.5.2 Rev 167088
This issue also exists on the trunk. I am in the process of bootstrap testing this for i686-pc-linux-gnu. I will send out this patch once it checks out. The attached patch is Vs 4.5.2 Rev 167088. I encountered this behavior with 4.8.0: struct pollfd pfd[3]; ... pfd[2].events = POLLOUT; pfd[2].revents = 0; This compiled to: movw $4, 44(%rsp) #, pfd[2].events movw $0, 46(%rsp) #, pfd[2].revents Store merging currently merges the two loads and stores of short ints into a normal int, so this can be closed. I have proposed to add this testcase to the testsuite: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563096.html Eh, really closing. The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>: https://gcc.gnu.org/g:d7e681fc3afff24a6279058cbb0b0dc4cd96be8c commit r11-6862-gd7e681fc3afff24a6279058cbb0b0dc4cd96be8c Author: Martin Jambor <mjambor@suse.cz> Date: Fri Jan 22 18:09:38 2021 +0100 Testcase for old PR 47059 I stumbled across PR 47059 from 2010 which has been addressed by store-merging. I am going to close it but would like to add its testcase too. gcc/testsuite/ChangeLog: 2021-01-08 Martin Jambor <mjambor@suse.cz> PR tree-optimization/47059 * gcc.dg/tree-ssa/pr47059.c: New test. |