diff options
| author | Artemiy Volkov <artemiy.volkov@arm.com> | 2025-10-27 14:47:31 +0000 |
|---|---|---|
| committer | Richard Earnshaw <rearnsha@arm.com> | 2025-10-28 10:01:37 +0000 |
| commit | 5eafa8d16be87339acd11446283c571b2416a532 (patch) | |
| tree | 190f53218f82fc22f4dbb8c7531e57633cba32db /contrib/gcc-changelog/git_commit.py | |
| parent | b8a8bb30d950b49beeac17e3495ca78d67278cd7 (diff) | |
| download | gcc-5eafa8d16be87339acd11446283c571b2416a532.zip gcc-5eafa8d16be87339acd11446283c571b2416a532.tar.gz gcc-5eafa8d16be87339acd11446283c571b2416a532.tar.bz2 | |
match.pd: simplify (view_convert (BIT_FIELD_REF))
This patch adds a match.pd transformation to strip unnecessary
view_converts of BIT_FIELD_REFs. This is only valid when the type of the
view_convert is a register type, and no loss of precision is involved when
casting to an integer type; both of these conditions are checked for in
the if clause of the new pattern.
The change survives bootstrap + regtest on aarch64 and x86_64, and one
additional test case has been added to gcc.dg/tree-ssa.
Changes since v1:
- Require is_gimple_reg_type (type) and remove conditions on @0
- Reword the commit message to reflect code changes
gcc/ChangeLog:
* match.pd: Add pattern to simplify view_convert (BIT_FIELD_REF).
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/forwprop-42.c: New test.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions
