[Bug rtl-optimization/65235] Simplifying vec_select of vec_concat miscompiles when first element of vec_concat is const_int
jgreenhalgh at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 2 11:06:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65235
James Greenhalgh <jgreenhalgh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|aarch64 |aarch64*-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-02
CC| |jgreenhalgh at gcc dot gnu.org
Host| |*-*-*
Ever confirmed|0 |1
--- Comment #7 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> ---
The tescase from comment 5 fails for me at -O3 on an aarch64-none-elf cross
compiler (r221086), this also fails for native aarch64-none-linux-gnu.
As with Kyrill, I see:
(insn 16 15 17 2 (set (reg:V2DI 80 [ D.2809 ])
(vec_concat:V2DI (reg:DI 95 [ D.2812 ])
(reg:DI 77 [ D.2806 ]))) reduced.c:19 1386
{aarch64_combine_internaldi}
(expr_list:REG_DEAD (reg:DI 95 [ D.2812 ])
(expr_list:REG_DEAD (reg:DI 77 [ D.2806 ])
(expr_list:REG_EQUAL (vec_concat:V2DI (reg:DI 95 [ D.2812 ])
(const_int 4503599627370498 [0x10000000000002]))
(nil)))))
(insn 17 16 18 2 (set (reg:DI 96 [ D.2806 ])
(vec_select:DI (reg:V2DI 80 [ D.2809 ])
(parallel [
(const_int 0 [0])
]))) reduced.c:14 1372 {aarch64_get_lanev2di}
(expr_list:REG_DEAD (reg:V2DI 80 [ D.2809 ])
(nil)))
----
Combine:
Trying 16 -> 17:
Successfully matched this instruction:
(set (reg:DI 96 [ D.2806 ])
(reg:DI 77 [ D.2806 ]))
---
Which is bogus, the correct rewrite would be to:
(set (reg:DI 96 [ D.2806 ])
(reg:DI 95 [ D.2812 ]))
More information about the Gcc-bugs
mailing list