@@ -521,19 +521,10 @@ define i128 @mul128_low(i128 %in0, i128 %in1) {
521
521
ret i128 %retLo
522
522
}
523
523
524
- ; TODO: Skip vector type
524
+ ; Support vector type
525
525
define <2 x i8 > @mul_v2i8_low (<2 x i8 > %in0 , <2 x i8 > %in1 ) {
526
526
; CHECK-LABEL: @mul_v2i8_low(
527
- ; CHECK-NEXT: [[IN0LO:%.*]] = and <2 x i8> [[IN0:%.*]], <i8 15, i8 15>
528
- ; CHECK-NEXT: [[IN0HI:%.*]] = lshr <2 x i8> [[IN0]], <i8 4, i8 4>
529
- ; CHECK-NEXT: [[IN1LO:%.*]] = and <2 x i8> [[IN1:%.*]], <i8 15, i8 15>
530
- ; CHECK-NEXT: [[IN1HI:%.*]] = lshr <2 x i8> [[IN1]], <i8 4, i8 4>
531
- ; CHECK-NEXT: [[M10:%.*]] = mul <2 x i8> [[IN1HI]], [[IN0]]
532
- ; CHECK-NEXT: [[M01:%.*]] = mul <2 x i8> [[IN0HI]], [[IN1]]
533
- ; CHECK-NEXT: [[M00:%.*]] = mul nuw <2 x i8> [[IN1LO]], [[IN0LO]]
534
- ; CHECK-NEXT: [[ADDC:%.*]] = add <2 x i8> [[M10]], [[M01]]
535
- ; CHECK-NEXT: [[SHL:%.*]] = shl <2 x i8> [[ADDC]], <i8 4, i8 4>
536
- ; CHECK-NEXT: [[RETLO:%.*]] = add <2 x i8> [[SHL]], [[M00]]
527
+ ; CHECK-NEXT: [[RETLO:%.*]] = mul <2 x i8> [[IN0:%.*]], [[IN1:%.*]]
537
528
; CHECK-NEXT: ret <2 x i8> [[RETLO]]
538
529
;
539
530
%In0Lo = and <2 x i8 > %in0 , <i8 15 , i8 15 >
@@ -551,17 +542,11 @@ define <2 x i8> @mul_v2i8_low(<2 x i8> %in0, <2 x i8> %in1) {
551
542
552
543
define <2 x i8 > @mul_v2i8_low_one_extra_user (<2 x i8 > %in0 , <2 x i8 > %in1 ) {
553
544
; CHECK-LABEL: @mul_v2i8_low_one_extra_user(
554
- ; CHECK-NEXT: [[IN0LO:%.*]] = and <2 x i8> [[IN0:%.*]], <i8 15, i8 15>
555
- ; CHECK-NEXT: [[IN0HI:%.*]] = lshr <2 x i8> [[IN0]], <i8 4, i8 4>
545
+ ; CHECK-NEXT: [[IN0HI:%.*]] = lshr <2 x i8> [[IN0:%.*]], <i8 4, i8 4>
556
546
; CHECK-NEXT: [[IN1LO:%.*]] = and <2 x i8> [[IN1:%.*]], <i8 15, i8 15>
557
- ; CHECK-NEXT: [[IN1HI:%.*]] = lshr <2 x i8> [[IN1]], <i8 4, i8 4>
558
- ; CHECK-NEXT: [[M10:%.*]] = mul <2 x i8> [[IN1HI]], [[IN0]]
559
547
; CHECK-NEXT: [[M01:%.*]] = mul nuw <2 x i8> [[IN1LO]], [[IN0HI]]
560
548
; CHECK-NEXT: call void @use_v2i8(<2 x i8> [[M01]])
561
- ; CHECK-NEXT: [[M00:%.*]] = mul nuw <2 x i8> [[IN1LO]], [[IN0LO]]
562
- ; CHECK-NEXT: [[ADDC:%.*]] = add <2 x i8> [[M10]], [[M01]]
563
- ; CHECK-NEXT: [[SHL:%.*]] = shl <2 x i8> [[ADDC]], <i8 4, i8 4>
564
- ; CHECK-NEXT: [[RETLO:%.*]] = add <2 x i8> [[SHL]], [[M00]]
549
+ ; CHECK-NEXT: [[RETLO:%.*]] = mul <2 x i8> [[IN0]], [[IN1]]
565
550
; CHECK-NEXT: ret <2 x i8> [[RETLO]]
566
551
;
567
552
%In0Lo = and <2 x i8 > %in0 , <i8 15 , i8 15 >
@@ -578,19 +563,10 @@ define <2 x i8> @mul_v2i8_low_one_extra_user(<2 x i8> %in0, <2 x i8> %in1) {
578
563
ret <2 x i8 > %retLo
579
564
}
580
565
581
- ; TODO: Support wide width
566
+ ; Support wide width
582
567
define i130 @mul130_low (i130 %in0 , i130 %in1 ) {
583
568
; CHECK-LABEL: @mul130_low(
584
- ; CHECK-NEXT: [[IN0LO:%.*]] = and i130 [[IN0:%.*]], 36893488147419103231
585
- ; CHECK-NEXT: [[IN0HI:%.*]] = lshr i130 [[IN0]], 65
586
- ; CHECK-NEXT: [[IN1LO:%.*]] = and i130 [[IN1:%.*]], 36893488147419103231
587
- ; CHECK-NEXT: [[IN1HI:%.*]] = lshr i130 [[IN1]], 65
588
- ; CHECK-NEXT: [[M10:%.*]] = mul i130 [[IN1HI]], [[IN0]]
589
- ; CHECK-NEXT: [[M01:%.*]] = mul i130 [[IN0HI]], [[IN1]]
590
- ; CHECK-NEXT: [[M00:%.*]] = mul nuw i130 [[IN1LO]], [[IN0LO]]
591
- ; CHECK-NEXT: [[ADDC:%.*]] = add i130 [[M10]], [[M01]]
592
- ; CHECK-NEXT: [[SHL:%.*]] = shl i130 [[ADDC]], 65
593
- ; CHECK-NEXT: [[RETLO:%.*]] = add i130 [[SHL]], [[M00]]
569
+ ; CHECK-NEXT: [[RETLO:%.*]] = mul i130 [[IN0:%.*]], [[IN1:%.*]]
594
570
; CHECK-NEXT: ret i130 [[RETLO]]
595
571
;
596
572
%In0Lo = and i130 %in0 , 36893488147419103231
@@ -609,16 +585,10 @@ define i130 @mul130_low(i130 %in0, i130 %in1) {
609
585
define i130 @mul130_low_one_extra_user (i130 %in0 , i130 %in1 ) {
610
586
; CHECK-LABEL: @mul130_low_one_extra_user(
611
587
; CHECK-NEXT: [[IN0LO:%.*]] = and i130 [[IN0:%.*]], 36893488147419103231
612
- ; CHECK-NEXT: [[IN0HI:%.*]] = lshr i130 [[IN0]], 65
613
- ; CHECK-NEXT: [[IN1LO:%.*]] = and i130 [[IN1:%.*]], 36893488147419103231
614
- ; CHECK-NEXT: [[IN1HI:%.*]] = lshr i130 [[IN1]], 65
588
+ ; CHECK-NEXT: [[IN1HI:%.*]] = lshr i130 [[IN1:%.*]], 65
615
589
; CHECK-NEXT: [[M10:%.*]] = mul nuw i130 [[IN1HI]], [[IN0LO]]
616
590
; CHECK-NEXT: call void @use130(i130 [[M10]])
617
- ; CHECK-NEXT: [[M01:%.*]] = mul i130 [[IN0HI]], [[IN1]]
618
- ; CHECK-NEXT: [[M00:%.*]] = mul nuw i130 [[IN1LO]], [[IN0LO]]
619
- ; CHECK-NEXT: [[ADDC:%.*]] = add i130 [[M10]], [[M01]]
620
- ; CHECK-NEXT: [[SHL:%.*]] = shl i130 [[ADDC]], 65
621
- ; CHECK-NEXT: [[RETLO:%.*]] = add i130 [[SHL]], [[M00]]
591
+ ; CHECK-NEXT: [[RETLO:%.*]] = mul i130 [[IN0]], [[IN1]]
622
592
; CHECK-NEXT: ret i130 [[RETLO]]
623
593
;
624
594
%In0Lo = and i130 %in0 , 36893488147419103231
0 commit comments