File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4564,6 +4564,25 @@ define i32 @src_no_trans_select_xor_eq0_or_xor(i32 %x, i32 %y) {
45644564 ret i32 %cond
45654565}
45664566
4567+ define i32 @src_no_trans_select_xor_eqc_and_disjoint_or_and_notc (i32 noundef %x , i32 noundef %y , i32 %c ) {
4568+ ; CHECK-LABEL: @src_no_trans_select_xor_eqc_and_disjoint_or_and_notc(
4569+ ; CHECK-NEXT: entry:
4570+ ; CHECK-NEXT: [[OR:%.*]] = or disjoint i32 [[Y:%.*]], [[X:%.*]]
4571+ ; CHECK-NEXT: [[NOT:%.*]] = xor i32 [[C:%.*]], -1
4572+ ; CHECK-NEXT: [[AND1:%.*]] = and i32 [[OR]], [[NOT]]
4573+ ; CHECK-NEXT: ret i32 [[AND1]]
4574+ ;
4575+ entry:
4576+ %xor = xor i32 %y , %x
4577+ %cmp = icmp eq i32 %xor , %c
4578+ %and = and i32 %x , %y
4579+ %or = or disjoint i32 %y , %x
4580+ %not = xor i32 %c , -1
4581+ %and1 = and i32 %or , %not
4582+ %cond = select i1 %cmp , i32 %and , i32 %and1
4583+ ret i32 %cond
4584+ }
4585+
45674586; (X == C) ? X : Y -> (X == C) ? C : Y
45684587; Fixed #77553
45694588define i32 @src_select_xxory_eq0_xorxy_y (i32 %x , i32 %y ) {
You can’t perform that action at this time.
0 commit comments