Possible missing DAGCombine opportunity?

Hi All,

The initial SelectionDAG I have has the following snippet.

t10: i64,ch = load<LD8%1> t0, t4, undef:i32
t13: i64 = srl t10, Constant:i32<8>
t14: i32 = truncate t13

and after DAGCombine the SelectionDAG becomes,

t10: i64,ch = load<LD8%1> t0, t4, undef:i32
t30: i32 = truncate t10
t36: i32 = srl t30, Constant:i32<6>

Here I want to load i32 if possible. Can above pattern be combined further?
If not, I find it’s because srl and truncate be swapped, and the truncate in
the middle blocks DAGCombine combine srl and load. Any idea on why
DAGCombine perform this way?

Thanks.

Regards,
chenwj