Re: [PATCH 3/6] gcc/expmed.c: Ensure vector modes are tieable before extraction

2021-10-22 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > Extracting a bitfield from a vector can be achieved by casting the > vector to a new type whose elements are the same size as the desired > bitfield, before generating a subreg. However, this is only an > optimization if the original vector can be accessed in the

[PATCH 3/6] gcc/expmed.c: Ensure vector modes are tieable before extraction

2021-10-22 Thread Jonathan Wright via Gcc-patches
Hi, Extracting a bitfield from a vector can be achieved by casting the vector to a new type whose elements are the same size as the desired bitfield, before generating a subreg. However, this is only an optimization if the original vector can be accessed in the new machine mode without first being