the pattern catch the following:
// trunc (select c, a, b) -> select c, (trunc a), (trunc b)
in case select has more than one use the exist pattern will add extra select.
i16 t1 = select c, a , b
i16 t2 = srl t1, 3
i8 t3 = trunc i16 t1 to i8
-->
i8 a1 = trunc i16 a to i8
i8 b1 = trunc i16 a to i8
i8 t3 = select c, a1 , b1
i16 t1 = select c, a , b
i16 t2 = srl t1, 3
Can this test be reduced to a smaller example?
Please add a comment explaining what this test checks.