https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91191
--- Comment #11 from Jeffrey A. Law <law at gcc dot gnu.org> --- Note that I just ack'd a patch from Andrew P that elides the VCE when the underlying object has a 0/1 value and thus we don't have to worry about any other values. It's in match.pd and may make your patch unnecessary -- I haven't checked, but you might want to try this BZ again after this patch: commit 2f7edefc54e6967168c3cce3a4347cc0bc6a8155 Author: Andrew Pinski <[email protected]> Date: Sun Oct 5 22:39:35 2025 -0700 [PATCH] match: simplify `VCE<bool>({0,1}) ==/!= 0` to `{0,1} ==/!= 0` [PR105749] Or possibly this one as well. It doesn't elide the VCE, but does adjust how we expand certain cases where we know an object has a 0/1 value. commit 89f8c4709446f4b16fe88ac25cfef7fa9a73f296 Author: Andrew Pinski <[email protected]> Date: Sun Oct 26 12:21:08 2025 -0700 expand: Move the [0,1] detection for a*b to use the ranger
