diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-09-01 12:06:25 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-09-01 12:06:25 +0200 |
commit | 45ff12512e568089a4c7b85b5322ab8019723cd9 (patch) | |
tree | 00ada361aa22b887d2ac8591a4608a8c303047a5 /gcc/tree-vectorizer.h | |
parent | e6bd9c42b0ad0cc4a615135612599adb829f2d9c (diff) | |
download | gcc-45ff12512e568089a4c7b85b5322ab8019723cd9.zip gcc-45ff12512e568089a4c7b85b5322ab8019723cd9.tar.gz gcc-45ff12512e568089a4c7b85b5322ab8019723cd9.tar.bz2 |
bswap: Fix up bswap_view_convert handling [PR102141]
bswap_view_convert is used twice in spots where gsi_insert_before is the
right thing, but in the last one it wants to insert preparation stmts
for the VIEW_CONVERT_EXPR emitted with gsi_insert_after, where at the
gsi we still need to insert bswap_stmt and maybe mask_stmt whose lhs
the preparation stmts will use.
So, this patch adds a BEFORE argument to the function and emits the
preparation statements before or after depending on that.
2021-09-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/102141
* gimple-ssa-store-merging.c (bswap_view_convert): Add BEFORE
argument. If false, emit stmts after gsi instead of before, and
with GSI_NEW_STMT.
(bswap_replace): Adjust callers. When converting output of bswap,
emit VIEW_CONVERT prepratation stmts after a copy of gsi instead
of before it.
* gcc.dg/pr102141.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions