Summary: | Unnecessary vector register spill | ||
---|---|---|---|
Product: | gcc | Reporter: | H.J. Lu <hjl.tools> |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | dimhen, ubizjak |
Priority: | P3 | Keywords: | missed-optimization |
Version: | 4.9.0 | ||
Target Milestone: | --- | ||
Host: | Target: | x86-64 | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2013-12-11 00:00:00 | |
Bug Depends on: | |||
Bug Blocks: | 53947, 89582, 101926 |
Description
H.J. Lu
2013-12-11 00:54:17 UTC
struct8 (struct test_structure_8 ts) { vector(4) float vect__2.10; vector(4) float vect_ts_f1_9.9; struct test_structure_8 D.1759; ;; basic block 2, loop depth 0 ;; pred: ENTRY vect_ts_f1_9.9_15 = MEM[(struct *)&ts]; vect__2.10_17 = vect_ts_f1_9.9_15 + { 1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0 }; MEM[(struct *)&D.1759] = vect__2.10_17; return D.1759; ;; succ: EXIT } OTOH the code generated is much much worse if you disable vectorization. Then we should make sure the stack slot we spill the arguments to is properly aligned so we can avoid the UNSPEC_LOADU. This eventually can lead to cleanup opportunities. Ideally we'd recognize that we can more optimally load from the argument registers into a V4SF register of course (but due to the way we do argument setup during expand this may not be easily possible). It's of course the bad ABI choice that leads to this mess ... |