On Mon, May 7, 2012 at 1:34 PM, Richard Guenther <richard.guent...@gmail.com> wrote: > On Mon, May 7, 2012 at 1:28 PM, Steven Bosscher <stevenb....@gmail.com> wrote: >> Hello, >> >> When I moved the first bits of the switch lowering code from stmt.c, I >> didn't anticipate that the GIMPLE passes can sometimes perform >> transformations that break the rules the gimplifier uses while >> lowering SWITCH_EXPRs. >> >> The attached patch adds the expected rules to the GIMPLE_SWITCH verifier. >> >> Bootstrap&test running on powerpc64-unknown-linux-gnu. OK if it passes? > > Ok!
Thanks. I've committed a slightly weaker version that allows the type of case label values to be different from the index type, as long as all case labels have the same type and the type precision of the index type is not less than the case label value type. I allowed that earlier in the gimplifier to avoid fold_converting case label values to larger types and then back to smaller types. Bootstrapped&tested on powerpc64-unknown-linux-gnu, committed as r187242. Ciao! Steven