GCN uses V64BImode to represent vector masks in the middle-end, and DImode bit-masks to represent them in the back-end. These must be converted at expand time and the most convenient way is to simply use a SUBREG. This works fine except that simplify_subreg needs to be able to convert immediates, mostly for REG_EQUAL and REG_EQUIV, and currently does not know how to convert vectors to integers where there is more than one element per byte. This patch implements such conversions for the cases that we need. I don't know why this is not a problem for other targets that use BImode vectors, such as ARM SVE, so it's possible I missed some magic somewhere? 2018-09-05 Andrew Stubbs gcc/ * simplify-rtx.c (convert_packed_vector): New function. (simplify_immed_subreg): Recognised Boolean vectors and call convert_packed_vector. --- gcc/simplify-rtx.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+)