Hi all, This is a follow up for my previous fix for PR 67328.
My original simple addition to match.pd no longer worked with GCC 7 codebase so I instead added a special case to build_range_check. I kept match.pd pattern as it still works in some other useful cases as illustrated by fold-masked-cmp-3.c. Bootstrapped and regtested on x86_64. -I