If it is implemented in the ranger the way I think it should be implemented, you might only figure out if there was a multiply with if case afterwards; not if the & part was optimized away. So it might be hard to figure out if it is fully used.
As the original case it was originally reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95433 .
Which mentions clang does the original testcase already; just GCC expanded the optimization to be more generic it seems.