File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -100,3 +100,23 @@ block2:
100
100
%conv2 = zext i1 %cmp1 to i32
101
101
ret i32 %conv2
102
102
}
103
+
104
+ ; FIXME: This should not end with more instructions than it started from.
105
+
106
+ define i32 @PR49475 (i32 %x , i16 %y ) {
107
+ ; CHECK-LABEL: @PR49475(
108
+ ; CHECK-NEXT: [[M:%.*]] = and i16 [[Y:%.*]], 1
109
+ ; CHECK-NEXT: [[B1:%.*]] = icmp eq i32 [[X:%.*]], 0
110
+ ; CHECK-NEXT: [[B11:%.*]] = zext i1 [[B1]] to i32
111
+ ; CHECK-NEXT: [[TMP1:%.*]] = xor i16 [[M]], 1
112
+ ; CHECK-NEXT: [[TMP2:%.*]] = zext i16 [[TMP1]] to i32
113
+ ; CHECK-NEXT: [[Z3:%.*]] = or i32 [[B11]], [[TMP2]]
114
+ ; CHECK-NEXT: ret i32 [[Z3]]
115
+ ;
116
+ %m = and i16 %y , 1
117
+ %b1 = icmp eq i32 %x , 0
118
+ %b2 = icmp eq i16 %m , 0
119
+ %t1 = or i1 %b1 , %b2
120
+ %z = zext i1 %t1 to i32
121
+ ret i32 %z
122
+ }
You can’t perform that action at this time.
0 commit comments