1 ; RUN: opt -instcombine -S < %s | FileCheck %s
2 ; <rdar://problem/8606771>
4 define i32 @main(i32 %argc) nounwind ssp {
6 %tmp3151 = trunc i32 %argc to i8
7 %tmp3161 = or i8 %tmp3151, -17
8 %tmp3162 = and i8 %tmp3151, 122
9 %tmp3163 = xor i8 %tmp3162, -17
10 %tmp4114 = shl i8 %tmp3163, 6
11 %tmp4115 = xor i8 %tmp4114, %tmp3163
12 %tmp4120 = xor i8 %tmp3161, %tmp4115
13 ; CHECK: lshr i8 %tmp4115, 1
14 ; CHECK-NOT: shl i8 %tmp4126, 6
15 %tmp4126 = lshr i8 %tmp4120, 7
16 %tmp4127 = mul i8 %tmp4126, 64
17 %tmp4086 = zext i8 %tmp4127 to i32