public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/109259] New: rs6000:pass_analyze_swaps should preserve some rtx notes
@ 2023-03-23 6:23 linkw at gcc dot gnu.org
2023-03-23 6:24 ` [Bug target/109259] " linkw at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-03-23 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109259
Bug ID: 109259
Summary: rs6000:pass_analyze_swaps should preserve some rtx
notes
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: linkw at gcc dot gnu.org
Target Milestone: ---
When I was constructing test case for PR109069, I found that rs6000 specific
pass pass_analyze_swaps doesn't try to preserve REG_EQUAL notes for vector
constant. One typical case is:
#include <altivec.h>
vector signed int test2(vector signed int v1){
vector signed int v = {-128, -1280, 1280, 128};
return v+v1;
}
On LE, with -O2 -mcpu=power8, in 261r.swaps dump:
(insn 6 3 17 2 (set (reg/f:DI 121)
(unspec:DI [
(symbol_ref/u:DI ("*.LC0") [flags 0x82])
(reg:DI 2 2)
] UNSPEC_TOCREL)) "tt.c":7:12 764 {*tocrefdi}
(expr_list:REG_EQUAL (symbol_ref/u:DI ("*.LC0") [flags 0x82])
(nil)))
(insn 17 6 18 2 (set (reg:V4SI 122)
(mem/u/c:V4SI (and:DI (reg/f:DI 121)
(const_int -16 [0xfffffffffffffff0])) [0 S16 A128]))
"tt.c":7:12 -1
(nil))
while in 260r.dfinit dump, it has:
(note 3 2 6 2 NOTE_INSN_FUNCTION_BEG)
(insn 6 3 7 2 (set (reg/f:DI 121)
(unspec:DI [
(symbol_ref/u:DI ("*.LC0") [flags 0x82])
(reg:DI 2 2)
] UNSPEC_TOCREL)) "tt.c":7:12 764 {*tocrefdi}
(expr_list:REG_EQUAL (symbol_ref/u:DI ("*.LC0") [flags 0x82])
(nil)))
(insn 7 6 8 2 (set (reg:V4SI 122)
(vec_select:V4SI (mem/u/c:V4SI (reg/f:DI 121) [0 S16 A128])
(parallel [
(const_int 2 [0x2])
(const_int 3 [0x3])
(const_int 0 [0])
(const_int 1 [0x1])
]))) "tt.c":7:12 1369 {*vsx_lxvd2x4_le_v4si}
(nil))
(insn 8 7 9 2 (set (reg:V4SI 120)
(vec_select:V4SI (reg:V4SI 122)
(parallel [
(const_int 2 [0x2])
(const_int 3 [0x3])
(const_int 0 [0])
(const_int 1 [0x1])
]))) "tt.c":7:12 1358 {xxswapd_v4si}
(expr_list:REG_EQUAL (const_vector:V4SI [
(const_int -128 [0xffffffffffffff80])
(const_int -1280 [0xfffffffffffffb00])
(const_int 1280 [0x500])
(const_int 128 [0x80])
])
(nil)))
====
with -O2 -mcpu=power9, in 262r.cse1 rtl dump:
(insn 6 3 7 2 (set (reg/f:DI 121)
(unspec:DI [
(symbol_ref/u:DI ("*.LC0") [flags 0x82])
(reg:DI 2 2)
] UNSPEC_TOCREL)) "tt.c":7:12 764 {*tocrefdi}
(expr_list:REG_EQUAL (symbol_ref/u:DI ("*.LC0") [flags 0x82])
(nil)))
(insn 7 6 8 2 (set (reg:V4SI 120)
(mem/u/c:V4SI (reg/f:DI 121) [0 S16 A128])) "tt.c":7:12 1182
{vsx_movv4si_64bit}
(expr_list:REG_DEAD (reg/f:DI 121)
(expr_list:REG_EQUAL (const_vector:V4SI [
(const_int -128 [0xffffffffffffff80])
(const_int -1280 [0xfffffffffffffb00])
(const_int 1280 [0x500])
(const_int 128 [0x80])
])
(nil))))
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/109259] rs6000:pass_analyze_swaps should preserve some rtx notes
2023-03-23 6:23 [Bug target/109259] New: rs6000:pass_analyze_swaps should preserve some rtx notes linkw at gcc dot gnu.org
@ 2023-03-23 6:24 ` linkw at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-03-23 6:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109259
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
CC| |bergner at gcc dot gnu.org,
| |segher at gcc dot gnu.org
Target| |powerpc64le-linux-gnu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-23 6:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 6:23 [Bug target/109259] New: rs6000:pass_analyze_swaps should preserve some rtx notes linkw at gcc dot gnu.org
2023-03-23 6:24 ` [Bug target/109259] " linkw at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).