public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104151] [9/10/11/12 Regression] x86: excessive code generated for 128-bit byteswap Date: Fri, 21 Jan 2022 01:25:32 +0000 [thread overview] Message-ID: <bug-104151-4-E6AFxudDHu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104151-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104151 --- Comment #3 from Hongtao.liu <crazylht at gmail dot com> --- 172_1 1 times scalar_store costs 12 in body 173_2 1 times scalar_store costs 12 in body 174__builtin_bswap64 (_8) 1 times scalar_stmt costs 4 in body 175__builtin_bswap64 (_10) 1 times scalar_stmt costs 4 in body 176BIT_FIELD_REF <a_3(D), 64, 64> 1 times scalar_stmt costs 4 in body 177BIT_FIELD_REF <a_3(D), 64, 0> 1 times scalar_stmt costs 4 in body 1781<unknown> 1 times vec_perm costs 4 in body 179__builtin_bswap64 (_8) 1 times vector_stmt costs 4 in prologue 180__builtin_bswap64 (_8) 1 times vec_perm costs 4 in body 181_1 1 times vector_store costs 16 in body 182test.cc:9:10: note: Cost model analysis for part in loop 0: 183 Vector cost: 28 184 Scalar cost: 40 ... 243 <bb 2> [local count: 1073741824]: 244 _8 = BIT_FIELD_REF <a_3(D), 64, 64>; 245 _11 = VIEW_CONVERT_EXPR<vector(2) long unsigned int>(a_3(D)); 246 _13 = VIEW_CONVERT_EXPR<vector(2) long unsigned int>(a_3(D)); 247 _12 = VEC_PERM_EXPR <_11, _13, { 1, 0 }>; 248 _14 = VIEW_CONVERT_EXPR<vector(16) char>(_12); 249 _15 = VEC_PERM_EXPR <_14, _14, { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }>; 250 _16 = VIEW_CONVERT_EXPR<vector(2) long unsigned int>(_15); 251 _1 = __builtin_bswap64 (_8); 252 _10 = BIT_FIELD_REF <a_3(D), 64, 0>; 253 _2 = __builtin_bswap64 (_10); 254 MEM <vector(2) long unsigned int> [(long unsigned int *)&y] = _16; 255 _7 = MEM <uint128_t> [(char * {ref-all})&y]; 1. According to ABI, uint128 is passed by 2 gpr, and there should be extra cost for _11 = VIEW_CONVERT_EXPR<vector(2) long unsigned int>(a_3(D)); 2. Why there's 1781<unknown> 1 times vec_perm costs 4 in body, should it be 2 times vec_perm costs?
next prev parent reply other threads:[~2022-01-21 1:25 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-20 23:24 [Bug target/104151] New: " nekotekina at gmail dot com 2022-01-20 23:41 ` [Bug middle-end/104151] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org 2022-01-21 1:03 ` crazylht at gmail dot com 2022-01-21 1:25 ` crazylht at gmail dot com [this message] 2022-01-21 1:28 ` crazylht at gmail dot com 2022-01-21 1:32 ` crazylht at gmail dot com 2022-01-21 8:28 ` rguenth at gcc dot gnu.org 2022-01-21 9:11 ` rsandifo at gcc dot gnu.org 2022-01-21 10:18 ` rguenth at gcc dot gnu.org 2022-01-21 10:29 ` rguenth at gcc dot gnu.org 2022-01-21 12:20 ` ubizjak at gmail dot com 2022-01-28 12:20 ` jakub at gcc dot gnu.org 2022-01-31 14:06 ` ubizjak at gmail dot com 2022-05-06 8:32 ` [Bug middle-end/104151] [9/10/11/12/13 " jakub at gcc dot gnu.org 2022-09-06 22:04 ` [Bug middle-end/104151] [10/11/12/13 " pobrn at protonmail dot com 2022-09-07 8:18 ` rguenth at gcc dot gnu.org 2023-05-08 12:23 ` [Bug middle-end/104151] [10/11/12/13/14 " rguenth at gcc dot gnu.org 2023-05-11 13:17 ` chfast at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-104151-4-E6AFxudDHu@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).