From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id E13793858C41 for ; Wed, 16 Aug 2023 11:28:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E13793858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fe4a89e7efso58143605e9.3 for ; Wed, 16 Aug 2023 04:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692185338; x=1692790138; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=LAlZsBlz/oeqFYycQgqxhgwfJzoya31ZTYonnqfFuY0=; b=Auf+2+6YIe8+nG+FF/xbI6y8DMpMBdvmQMKUlhys1eayMv3prDX0HffHIHRIEXTKOM YaE7LTnPYMG1UoGgPcCAVw3YbPIhiNppc2iaX1KyR1yNNE5LgK6+fBEK0pNKz5m/bcSv 4hOt0wVjTbeuyNLdsi1UKpKN3OqJr2sKdANTQlJXLq0SiWnvo9R9x3xtVKEx/Upm0RcA 8CL5rr1L7YJZrHkrXAJtOvn/kS9A3bn7Eg8vHuX/H/7FCbdCRrmY2u7TjD0u1DYW0Jpw ui8tj9ZpJ4fFb63t8qA0gzCv6/Pl7l6jckoTYB+44dzFv5HBdvFO/ZUmslPLs5sHQV+Z JRAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692185338; x=1692790138; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LAlZsBlz/oeqFYycQgqxhgwfJzoya31ZTYonnqfFuY0=; b=i3Q5AfOxzr3vAQZ4f7OEnqMNpQ2i3vKFZT5V09Or+utkLy/PC1wQPge4EToJ/TN/XH iAb8jsACtTtbMkoevsK8cXU+R4TIOEW+MzPe5Nm2QU76PiDX5Bw13f36vMrRxS9qJQMs f56R7e5Yd197FYcmxYjG6/z79lv/32m2LXBzC8C+o38T1+4rrA2BD6ZlIuHpm3tB+e+e DmUri7V3LF8FPFL3poRI6ArYr17ZSH9RSwjz/ydJeVqhmLDJ8/6NhwBhpFxQNUup9n/t pGOmm7QdacElu4lr+TnMFk/ItUVhIoubqQPF0skHrRjKMEsUg0sR0AP/SxfPMZFUUJwd Aeog== X-Gm-Message-State: AOJu0YwwChsFzKAq8gLZbelZUyNFh2kozWvxNNgN4to7hVQrVgWQ+v6Y fZGRd63VwE9DGCm25thFrK1oAh9Grw4y0rGmg33HsfbZy4XSCXDhqDI= X-Google-Smtp-Source: AGHT+IG2G+Gu58wqyEUpnTZSpE6rwbCS31FTspfRc3pU+P2uwNb8jJG6V5L5QcdwvEEzmmDqAX+QCGd/71+vzxlmA2s= X-Received: by 2002:adf:ee43:0:b0:317:67bf:337f with SMTP id w3-20020adfee43000000b0031767bf337fmr1130230wro.2.1692185337769; Wed, 16 Aug 2023 04:28:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Prathamesh Kulkarni Date: Wed, 16 Aug 2023 16:58:21 +0530 Message-ID: Subject: Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors To: Prathamesh Kulkarni , gcc Patches , richard.sandiford@arm.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 16 Aug 2023 at 15:21, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > >> Unfortunately, the patch regressed following tests on ppc64le and > >> armhf respectively: > >> gcc.target/powerpc/vec-perm-ctor.c scan-tree-dump-not optimized > >> "VIEW_CONVERT_EXPR" > >> gcc.dg/tree-ssa/forwprop-20.c scan-tree-dump-not forwprop1 "VEC_PERM_EXPR" > >> > >> This happens because of the change to vect_cst_ctor_array which > >> removes handling of VECTOR_CST, > >> and thus we return NULL_TREE for cases where VEC_PERM_EXPR has > >> vector_cst, ctor input operands. > >> > >> For eg we fail to fold VEC_PERM_EXPR for the following test taken from > >> forwprop-20.c: > >> void f (double d, vecf* r) > >> { > >> vecf x = { -d, 5 }; > >> vecf y = { 1, 4 }; > >> veci m = { 2, 0 }; > >> *r = __builtin_shuffle (x, y, m); // { 1, -d } > >> } > >> because vect_cst_ctor_to_array will now return NULL_TREE for vector_cst {1, 4}. > >> > >> The attached patch thus reverts the changes to vect_cst_ctor_to_array, > >> which makes the tests pass again. > >> I have put the patch for another round of bootstrap+test on the above > >> targets (aarch64, aarch64-sve, x86_64, armhf, ppc64le). > >> OK to commit if it passes ? > > The patch now passes bootstrap+test on all these targets. > > OK, thanks. Thanks a lot for the helpful reviews! Committed in: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a7dba4a1c05a76026d88dcccc0b519cf83bff9a2 Thanks, Prathamesh > > Richard