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 @@ -106,3 +106,23 @@ block2:
106
106
%conv2 = zext i1 %cmp1 to i32
107
107
ret i32 %conv2
108
108
}
109
+
110
+ ; FIXME: This should not end with more instructions than it started from.
111
+
112
+ define i32 @PR49475 (i32 %x , i16 %y ) {
113
+ ; CHECK-LABEL: @PR49475(
114
+ ; CHECK-NEXT: [[M:%.*]] = and i16 [[Y:%.*]], 1
115
+ ; CHECK-NEXT: [[B1:%.*]] = icmp eq i32 [[X:%.*]], 0
116
+ ; CHECK-NEXT: [[B11:%.*]] = zext i1 [[B1]] to i32
117
+ ; CHECK-NEXT: [[TMP1:%.*]] = xor i16 [[M]], 1
118
+ ; CHECK-NEXT: [[TMP2:%.*]] = zext i16 [[TMP1]] to i32
119
+ ; CHECK-NEXT: [[Z3:%.*]] = or i32 [[B11]], [[TMP2]]
120
+ ; CHECK-NEXT: ret i32 [[Z3]]
121
+ ;
122
+ %m = and i16 %y , 1
123
+ %b1 = icmp eq i32 %x , 0
124
+ %b2 = icmp eq i16 %m , 0
125
+ %t1 = or i1 %b1 , %b2
126
+ %z = zext i1 %t1 to i32
127
+ ret i32 %z
128
+ }
You can’t perform that action at this time.
0 commit comments