From: Dhruv Chawla <[email protected]>

This is a more invasive change compared to the previous attempts to do
this:
  - v1: https://gcc.gnu.org/pipermail/gcc-patches/2026-October/733975.html
  - v2: https://gcc.gnu.org/pipermail/gcc-patches/2026-October/734240.html
  - Andrea's patch: 
https://gcc.gnu.org/pipermail/gcc-patches/2026-October/734555.html
  - Richard Sandiford's patch: 
https://gcc.gnu.org/pipermail/gcc-patches/2026-October/734673.html

This replaces all usage sites of gimple_folder::lhs with a new member
function that lazily materializes the LHS on-demand, so that it is only
created when required. It also replaces instances of TREE_TYPE (lhs) and
similar with a new member ret_type, which is likely a change worth
having on its own as it removes the need to query the type of the lhs
which can lead to a segfault when NULL.

Dhruv Chawla (2):
  aarch64: Fix ICE on discarded intrinsic result [PR127771]
  aarch64: Drop local aliases of gimple_folder::ret_type [NFC]

 gcc/config/aarch64/aarch64-acle-builtins.cc   |  70 ++++----
 gcc/config/aarch64/aarch64-acle-builtins.h    |  12 +-
 .../aarch64/aarch64-neon-builtins-base.cc     |  75 ++++----
 .../aarch64/aarch64-sve-builtins-base.cc      | 168 +++++++++---------
 .../aarch64/aarch64-sve-builtins-functions.h  |   6 +-
 .../aarch64/aarch64-sve-builtins-sve2.cc      |  13 +-
 .../aarch64/sve/acle/general/pr127771.c       |  24 +++
 7 files changed, 194 insertions(+), 174 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr127771.c

-- 
2.43.0

Reply via email to