@@ -458,10 +458,10 @@ define i32 @unrelated_ops(i32 %in, i32 %in2) {
458458; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP2]], [[IN2:%.*]]
459459; CHECK-NEXT: ret i32 [[OUT]]
460460;
461- %1 = and i32 %in , 3
462- %temp = mul nuw nsw i32 %1 , 72
463- %2 = and i32 %in , 12
464- %temp2 = mul nuw nsw i32 %2 , 72
461+ %and0 = and i32 %in , 3
462+ %temp = mul nuw nsw i32 %and0 , 72
463+ %and1 = and i32 %in , 12
464+ %temp2 = mul nuw nsw i32 %and1 , 72
465465 %temp3 = or disjoint i32 %in2 , %temp2
466466 %out = or disjoint i32 %temp , %temp3
467467 ret i32 %out
@@ -474,10 +474,10 @@ define i32 @unrelated_ops1(i32 %in, i32 %in2) {
474474; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP2]], [[IN2:%.*]]
475475; CHECK-NEXT: ret i32 [[OUT]]
476476;
477- %1 = and i32 %in , 3
478- %temp = mul nuw nsw i32 %1 , 72
479- %2 = and i32 %in , 12
480- %temp2 = mul nuw nsw i32 %2 , 72
477+ %and0 = and i32 %in , 3
478+ %temp = mul nuw nsw i32 %and0 , 72
479+ %and1 = and i32 %in , 12
480+ %temp2 = mul nuw nsw i32 %and1 , 72
481481 %temp3 = or disjoint i32 %in2 , %temp
482482 %out = or disjoint i32 %temp3 , %temp2
483483 ret i32 %out
@@ -488,14 +488,14 @@ define i32 @unrelated_ops2(i32 %in, i32 %in2, i32 %in3) {
488488; CHECK-NEXT: [[TMP1:%.*]] = and i32 [[IN:%.*]], 15
489489; CHECK-NEXT: [[TMP2:%.*]] = mul nuw nsw i32 [[TMP1]], 72
490490; CHECK-NEXT: [[TMP3:%.*]] = or disjoint i32 [[IN3:%.*]], [[IN2:%.*]]
491- ; CHECK-NEXT: [[OUT:%.*]] = or i32 [[TMP3]], [[TMP2]]
491+ ; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP3]], [[TMP2]]
492492; CHECK-NEXT: ret i32 [[OUT]]
493493;
494- %1 = and i32 %in , 3
495- %temp = mul nuw nsw i32 %1 , 72
494+ %and0 = and i32 %in , 3
495+ %temp = mul nuw nsw i32 %and0 , 72
496496 %temp3 = or disjoint i32 %temp , %in3
497- %2 = and i32 %in , 12
498- %temp2 = mul nuw nsw i32 %2 , 72
497+ %and1 = and i32 %in , 12
498+ %temp2 = mul nuw nsw i32 %and1 , 72
499499 %temp4 = or disjoint i32 %in2 , %temp2
500500 %out = or disjoint i32 %temp3 , %temp4
501501 ret i32 %out
@@ -506,15 +506,15 @@ define i32 @unrelated_ops3(i32 %in, i32 %in2, i32 %in3) {
506506; CHECK-NEXT: [[TMP2:%.*]] = and i32 [[IN:%.*]], 14
507507; CHECK-NEXT: [[TEMP2:%.*]] = mul nuw nsw i32 [[TMP2]], 72
508508; CHECK-NEXT: [[TMP3:%.*]] = or disjoint i32 [[IN3:%.*]], [[IN2:%.*]]
509- ; CHECK-NEXT: [[OUT:%.*]] = or i32 [[TMP3]], [[TEMP2]]
509+ ; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP3]], [[TEMP2]]
510510; CHECK-NEXT: ret i32 [[OUT]]
511511;
512- %1 = and i32 %in , 2
513- %cmp = icmp eq i32 %1 , 0
512+ %and0 = and i32 %in , 2
513+ %cmp = icmp eq i32 %and0 , 0
514514 %temp = select i1 %cmp , i32 0 , i32 144
515515 %temp3 = or disjoint i32 %temp , %in3
516- %2 = and i32 %in , 12
517- %temp2 = mul nuw nsw i32 %2 , 72
516+ %and1 = and i32 %in , 12
517+ %temp2 = mul nuw nsw i32 %and1 , 72
518518 %temp4 = or disjoint i32 %in2 , %temp2
519519 %out = or disjoint i32 %temp3 , %temp4
520520 ret i32 %out
@@ -525,14 +525,14 @@ define i32 @unrelated_ops4(i32 %in, i32 %in2, i32 %in3) {
525525; CHECK-NEXT: [[TMP2:%.*]] = and i32 [[IN:%.*]], 14
526526; CHECK-NEXT: [[TMP3:%.*]] = mul nuw nsw i32 [[TMP2]], 72
527527; CHECK-NEXT: [[TMP4:%.*]] = or disjoint i32 [[IN3:%.*]], [[IN2:%.*]]
528- ; CHECK-NEXT: [[OUT:%.*]] = or i32 [[TMP4]], [[TMP3]]
528+ ; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP4]], [[TMP3]]
529529; CHECK-NEXT: ret i32 [[OUT]]
530530;
531- %1 = and i32 %in , 12
532- %temp = mul nuw nsw i32 %1 , 72
531+ %and0 = and i32 %in , 12
532+ %temp = mul nuw nsw i32 %and0 , 72
533533 %temp3 = or disjoint i32 %in2 , %temp
534- %2 = and i32 %in , 2
535- %cmp = icmp eq i32 %2 , 0
534+ %and1 = and i32 %in , 2
535+ %cmp = icmp eq i32 %and1 , 0
536536 %temp2 = select i1 %cmp , i32 0 , i32 144
537537 %temp4 = or disjoint i32 %temp2 , %in3
538538 %out = or disjoint i32 %temp3 , %temp4
@@ -544,15 +544,15 @@ define i32 @unrelated_ops5(i32 %in, i32 %in2, i32 %in3) {
544544; CHECK-NEXT: [[TMP2:%.*]] = and i32 [[IN:%.*]], 6
545545; CHECK-NEXT: [[TMP3:%.*]] = mul nuw nsw i32 [[TMP2]], 72
546546; CHECK-NEXT: [[TMP4:%.*]] = or disjoint i32 [[IN3:%.*]], [[IN2:%.*]]
547- ; CHECK-NEXT: [[OUT:%.*]] = or i32 [[TMP4]], [[TMP3]]
547+ ; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP4]], [[TMP3]]
548548; CHECK-NEXT: ret i32 [[OUT]]
549549;
550- %1 = and i32 %in , 2
551- %cmp = icmp eq i32 %1 , 0
550+ %and0 = and i32 %in , 2
551+ %cmp = icmp eq i32 %and0 , 0
552552 %temp = select i1 %cmp , i32 0 , i32 144
553553 %temp3 = or disjoint i32 %temp , %in3
554- %2 = and i32 %in , 4
555- %cmp2 = icmp eq i32 %2 , 0
554+ %and1 = and i32 %in , 4
555+ %cmp2 = icmp eq i32 %and1 , 0
556556 %temp2 = select i1 %cmp2 , i32 0 , i32 288
557557 %temp4 = or disjoint i32 %in2 , %temp2
558558 %out = or disjoint i32 %temp3 , %temp4
@@ -564,14 +564,14 @@ define i32 @unrelated_ops6(i32 %in, i32 %in2, i32 %in3) {
564564; CHECK-NEXT: [[TMP1:%.*]] = and i32 [[IN:%.*]], 15
565565; CHECK-NEXT: [[TMP2:%.*]] = mul nuw nsw i32 [[TMP1]], 72
566566; CHECK-NEXT: [[TMP3:%.*]] = or disjoint i32 [[IN3:%.*]], [[IN2:%.*]]
567- ; CHECK-NEXT: [[OUT:%.*]] = or i32 [[TMP3]], [[TMP2]]
567+ ; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP3]], [[TMP2]]
568568; CHECK-NEXT: ret i32 [[OUT]]
569569;
570- %1 = and i32 %in , 3
571- %temp = mul nuw nsw i32 %1 , 72
570+ %and0 = and i32 %in , 3
571+ %temp = mul nuw nsw i32 %and0 , 72
572572 %temp3 = or disjoint i32 %in3 , %temp
573- %2 = and i32 %in , 12
574- %temp2 = mul nuw nsw i32 %2 , 72
573+ %and1 = and i32 %in , 12
574+ %temp2 = mul nuw nsw i32 %and1 , 72
575575 %temp4 = or disjoint i32 %in2 , %temp2
576576 %out = or disjoint i32 %temp3 , %temp4
577577 ret i32 %out
@@ -582,14 +582,14 @@ define i32 @unrelated_ops7(i32 %in, i32 %in2, i32 %in3) {
582582; CHECK-NEXT: [[TMP1:%.*]] = and i32 [[IN:%.*]], 15
583583; CHECK-NEXT: [[TMP2:%.*]] = mul nuw nsw i32 [[TMP1]], 72
584584; CHECK-NEXT: [[TMP3:%.*]] = or disjoint i32 [[IN3:%.*]], [[IN2:%.*]]
585- ; CHECK-NEXT: [[OUT:%.*]] = or i32 [[TMP3]], [[TMP2]]
585+ ; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP3]], [[TMP2]]
586586; CHECK-NEXT: ret i32 [[OUT]]
587587;
588- %1 = and i32 %in , 3
589- %temp = mul nuw nsw i32 %1 , 72
588+ %and0 = and i32 %in , 3
589+ %temp = mul nuw nsw i32 %and0 , 72
590590 %temp3 = or disjoint i32 %in3 , %temp
591- %2 = and i32 %in , 12
592- %temp2 = mul nuw nsw i32 %2 , 72
591+ %and1 = and i32 %in , 12
592+ %temp2 = mul nuw nsw i32 %and1 , 72
593593 %temp4 = or disjoint i32 %temp2 , %in2
594594 %out = or disjoint i32 %temp3 , %temp4
595595 ret i32 %out
@@ -600,14 +600,14 @@ define i32 @unrelated_ops8(i32 %in, i32 %in2, i32 %in3) {
600600; CHECK-NEXT: [[TMP1:%.*]] = and i32 [[IN:%.*]], 15
601601; CHECK-NEXT: [[TMP2:%.*]] = mul nuw nsw i32 [[TMP1]], 72
602602; CHECK-NEXT: [[TMP3:%.*]] = or disjoint i32 [[IN3:%.*]], [[IN2:%.*]]
603- ; CHECK-NEXT: [[OUT:%.*]] = or i32 [[TMP3]], [[TMP2]]
603+ ; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP3]], [[TMP2]]
604604; CHECK-NEXT: ret i32 [[OUT]]
605605;
606- %1 = and i32 %in , 3
607- %temp = mul nuw nsw i32 %1 , 72
606+ %and0 = and i32 %in , 3
607+ %temp = mul nuw nsw i32 %and0 , 72
608608 %temp3 = or disjoint i32 %temp , %in3
609- %2 = and i32 %in , 12
610- %temp2 = mul nuw nsw i32 %2 , 72
609+ %and1 = and i32 %in , 12
610+ %temp2 = mul nuw nsw i32 %and1 , 72
611611 %temp4 = or disjoint i32 %temp2 , %in2
612612 %out = or disjoint i32 %temp3 , %temp4
613613 ret i32 %out
@@ -624,11 +624,11 @@ define i32 @unrelated_ops_nocombine(i32 %in, i32 %in2, i32 %in3) {
624624; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP4]], [[TMP3]]
625625; CHECK-NEXT: ret i32 [[OUT]]
626626;
627- %1 = and i32 %in , 3
628- %temp = mul nuw nsw i32 %1 , 72
627+ %and0 = and i32 %in , 3
628+ %temp = mul nuw nsw i32 %and0 , 72
629629 %temp3 = or disjoint i32 %temp , %in3
630- %2 = and i32 %in , 7
631- %temp2 = mul nuw nsw i32 %2 , 72
630+ %and1 = and i32 %in , 7
631+ %temp2 = mul nuw nsw i32 %and1 , 72
632632 %temp4 = or disjoint i32 %in2 , %temp2
633633 %out = or disjoint i32 %temp3 , %temp4
634634 ret i32 %out
@@ -645,11 +645,11 @@ define i32 @unrelated_ops_nocombine1(i32 %in, i32 %in2, i32 %in3) {
645645; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TMP4]], [[TMP3]]
646646; CHECK-NEXT: ret i32 [[OUT]]
647647;
648- %1 = and i32 %in , 3
649- %temp = mul nuw nsw i32 %1 , 72
648+ %and0 = and i32 %in , 3
649+ %temp = mul nuw nsw i32 %and0 , 72
650650 %temp3 = or disjoint i32 %temp , %in3
651- %2 = and i32 %in , 12
652- %temp2 = mul nuw nsw i32 %2 , 36
651+ %and1 = and i32 %in , 12
652+ %temp2 = mul nuw nsw i32 %and1 , 36
653653 %temp4 = or disjoint i32 %in2 , %temp2
654654 %out = or disjoint i32 %temp3 , %temp4
655655 ret i32 %out
@@ -663,8 +663,8 @@ define i32 @no_chain(i32 %in, i32 %in2, i32 %in3) {
663663; CHECK-NEXT: [[OUT:%.*]] = or disjoint i32 [[TEMP3]], [[IN2:%.*]]
664664; CHECK-NEXT: ret i32 [[OUT]]
665665;
666- %1 = and i32 %in , 3
667- %temp = mul nuw nsw i32 %1 , 72
666+ %and0 = and i32 %in , 3
667+ %temp = mul nuw nsw i32 %and0 , 72
668668 %temp3 = or disjoint i32 %temp , %in3
669669 %out = or disjoint i32 %temp3 , %in2
670670 ret i32 %out
0 commit comments