@@ -404,12 +404,13 @@ define i32 @fshl_i32_undef0_cst(i32 %a0) nounwind {
404
404
; X32-SSE2-LABEL: fshl_i32_undef0_cst:
405
405
; X32-SSE2: # %bb.0:
406
406
; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
407
- ; X32-SSE2-NEXT: shldl $9, %eax , %eax
407
+ ; X32-SSE2-NEXT: shrl $23 , %eax
408
408
; X32-SSE2-NEXT: retl
409
409
;
410
410
; X64-AVX2-LABEL: fshl_i32_undef0_cst:
411
411
; X64-AVX2: # %bb.0:
412
- ; X64-AVX2-NEXT: shldl $9, %edi, %eax
412
+ ; X64-AVX2-NEXT: movl %edi, %eax
413
+ ; X64-AVX2-NEXT: shrl $23, %eax
413
414
; X64-AVX2-NEXT: retq
414
415
%res = call i32 @llvm.fshl.i32 (i32 undef , i32 %a0 , i32 9 )
415
416
ret i32 %res
@@ -438,19 +439,18 @@ define i32 @fshl_i32_undef1_msk(i32 %a0, i32 %a1) nounwind {
438
439
; X32-SSE2-LABEL: fshl_i32_undef1_msk:
439
440
; X32-SSE2: # %bb.0:
440
441
; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
441
- ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
442
- ; X32-SSE2-NEXT: andl $7, %ecx
443
- ; X32-SSE2-NEXT: # kill: def $cl killed $cl killed $ecx
444
- ; X32-SSE2-NEXT: shldl %cl, %eax, %eax
442
+ ; X32-SSE2-NEXT: movb {{[0-9]+}}(%esp), %cl
443
+ ; X32-SSE2-NEXT: andb $7, %cl
444
+ ; X32-SSE2-NEXT: shll %cl, %eax
445
445
; X32-SSE2-NEXT: retl
446
446
;
447
447
; X64-AVX2-LABEL: fshl_i32_undef1_msk:
448
448
; X64-AVX2: # %bb.0:
449
449
; X64-AVX2-NEXT: movl %esi, %ecx
450
450
; X64-AVX2-NEXT: movl %edi, %eax
451
- ; X64-AVX2-NEXT: andl $7, %ecx
451
+ ; X64-AVX2-NEXT: andb $7, %cl
452
452
; X64-AVX2-NEXT: # kill: def $cl killed $cl killed $ecx
453
- ; X64-AVX2-NEXT: shldl %cl, %eax , %eax
453
+ ; X64-AVX2-NEXT: shll %cl, %eax
454
454
; X64-AVX2-NEXT: retq
455
455
%m = and i32 %a1 , 7
456
456
%res = call i32 @llvm.fshl.i32 (i32 %a0 , i32 undef , i32 %m )
@@ -461,13 +461,13 @@ define i32 @fshl_i32_undef1_cst(i32 %a0) nounwind {
461
461
; X32-SSE2-LABEL: fshl_i32_undef1_cst:
462
462
; X32-SSE2: # %bb.0:
463
463
; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
464
- ; X32-SSE2-NEXT: shldl $9, %eax , %eax
464
+ ; X32-SSE2-NEXT: shll $9, %eax
465
465
; X32-SSE2-NEXT: retl
466
466
;
467
467
; X64-AVX2-LABEL: fshl_i32_undef1_cst:
468
468
; X64-AVX2: # %bb.0:
469
469
; X64-AVX2-NEXT: movl %edi, %eax
470
- ; X64-AVX2-NEXT: shldl $9, %eax , %eax
470
+ ; X64-AVX2-NEXT: shll $9, %eax
471
471
; X64-AVX2-NEXT: retq
472
472
%res = call i32 @llvm.fshl.i32 (i32 %a0 , i32 undef , i32 9 )
473
473
ret i32 %res
@@ -513,19 +513,18 @@ define i32 @fshr_i32_undef0_msk(i32 %a0, i32 %a1) nounwind {
513
513
; X32-SSE2-LABEL: fshr_i32_undef0_msk:
514
514
; X32-SSE2: # %bb.0:
515
515
; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
516
- ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
517
- ; X32-SSE2-NEXT: andl $7, %ecx
518
- ; X32-SSE2-NEXT: # kill: def $cl killed $cl killed $ecx
519
- ; X32-SSE2-NEXT: shrdl %cl, %eax, %eax
516
+ ; X32-SSE2-NEXT: movb {{[0-9]+}}(%esp), %cl
517
+ ; X32-SSE2-NEXT: andb $7, %cl
518
+ ; X32-SSE2-NEXT: shrl %cl, %eax
520
519
; X32-SSE2-NEXT: retl
521
520
;
522
521
; X64-AVX2-LABEL: fshr_i32_undef0_msk:
523
522
; X64-AVX2: # %bb.0:
524
523
; X64-AVX2-NEXT: movl %esi, %ecx
525
524
; X64-AVX2-NEXT: movl %edi, %eax
526
- ; X64-AVX2-NEXT: andl $7, %ecx
525
+ ; X64-AVX2-NEXT: andb $7, %cl
527
526
; X64-AVX2-NEXT: # kill: def $cl killed $cl killed $ecx
528
- ; X64-AVX2-NEXT: shrdl %cl, %eax , %eax
527
+ ; X64-AVX2-NEXT: shrl %cl, %eax
529
528
; X64-AVX2-NEXT: retq
530
529
%m = and i32 %a1 , 7
531
530
%res = call i32 @llvm.fshr.i32 (i32 undef , i32 %a0 , i32 %m )
@@ -536,13 +535,13 @@ define i32 @fshr_i32_undef0_cst(i32 %a0) nounwind {
536
535
; X32-SSE2-LABEL: fshr_i32_undef0_cst:
537
536
; X32-SSE2: # %bb.0:
538
537
; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
539
- ; X32-SSE2-NEXT: shrdl $9, %eax , %eax
538
+ ; X32-SSE2-NEXT: shrl $9, %eax
540
539
; X32-SSE2-NEXT: retl
541
540
;
542
541
; X64-AVX2-LABEL: fshr_i32_undef0_cst:
543
542
; X64-AVX2: # %bb.0:
544
543
; X64-AVX2-NEXT: movl %edi, %eax
545
- ; X64-AVX2-NEXT: shrdl $9, %eax , %eax
544
+ ; X64-AVX2-NEXT: shrl $9, %eax
546
545
; X64-AVX2-NEXT: retq
547
546
%res = call i32 @llvm.fshr.i32 (i32 undef , i32 %a0 , i32 9 )
548
547
ret i32 %res
@@ -592,12 +591,13 @@ define i32 @fshr_i32_undef1_cst(i32 %a0) nounwind {
592
591
; X32-SSE2-LABEL: fshr_i32_undef1_cst:
593
592
; X32-SSE2: # %bb.0:
594
593
; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
595
- ; X32-SSE2-NEXT: shrdl $9, %eax , %eax
594
+ ; X32-SSE2-NEXT: shll $23 , %eax
596
595
; X32-SSE2-NEXT: retl
597
596
;
598
597
; X64-AVX2-LABEL: fshr_i32_undef1_cst:
599
598
; X64-AVX2: # %bb.0:
600
- ; X64-AVX2-NEXT: shrdl $9, %edi, %eax
599
+ ; X64-AVX2-NEXT: movl %edi, %eax
600
+ ; X64-AVX2-NEXT: shll $23, %eax
601
601
; X64-AVX2-NEXT: retq
602
602
%res = call i32 @llvm.fshr.i32 (i32 %a0 , i32 undef , i32 9 )
603
603
ret i32 %res
@@ -645,15 +645,14 @@ define i32 @fshl_i32_zero0(i32 %a0, i32 %a1) nounwind {
645
645
define i32 @fshl_i32_zero0_cst (i32 %a0 ) nounwind {
646
646
; X32-SSE2-LABEL: fshl_i32_zero0_cst:
647
647
; X32-SSE2: # %bb.0:
648
- ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
649
- ; X32-SSE2-NEXT: xorl %eax, %eax
650
- ; X32-SSE2-NEXT: shldl $9, %ecx, %eax
648
+ ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
649
+ ; X32-SSE2-NEXT: shrl $23, %eax
651
650
; X32-SSE2-NEXT: retl
652
651
;
653
652
; X64-AVX2-LABEL: fshl_i32_zero0_cst:
654
653
; X64-AVX2: # %bb.0:
655
- ; X64-AVX2-NEXT: xorl %eax , %eax
656
- ; X64-AVX2-NEXT: shldl $9, %edi , %eax
654
+ ; X64-AVX2-NEXT: movl %edi , %eax
655
+ ; X64-AVX2-NEXT: shrl $23 , %eax
657
656
; X64-AVX2-NEXT: retq
658
657
%res = call i32 @llvm.fshl.i32 (i32 0 , i32 %a0 , i32 9 )
659
658
ret i32 %res
@@ -683,15 +682,14 @@ define i32 @fshl_i32_zero1(i32 %a0, i32 %a1) nounwind {
683
682
define i32 @fshl_i32_zero1_cst (i32 %a0 ) nounwind {
684
683
; X32-SSE2-LABEL: fshl_i32_zero1_cst:
685
684
; X32-SSE2: # %bb.0:
686
- ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
687
- ; X32-SSE2-NEXT: xorl %eax, %eax
688
- ; X32-SSE2-NEXT: shrdl $23, %ecx, %eax
685
+ ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
686
+ ; X32-SSE2-NEXT: shll $9, %eax
689
687
; X32-SSE2-NEXT: retl
690
688
;
691
689
; X64-AVX2-LABEL: fshl_i32_zero1_cst:
692
690
; X64-AVX2: # %bb.0:
693
- ; X64-AVX2-NEXT: xorl %eax , %eax
694
- ; X64-AVX2-NEXT: shrdl $23, %edi , %eax
691
+ ; X64-AVX2-NEXT: movl %edi , %eax
692
+ ; X64-AVX2-NEXT: shll $9 , %eax
695
693
; X64-AVX2-NEXT: retq
696
694
%res = call i32 @llvm.fshl.i32 (i32 %a0 , i32 0 , i32 9 )
697
695
ret i32 %res
@@ -721,15 +719,14 @@ define i32 @fshr_i32_zero0(i32 %a0, i32 %a1) nounwind {
721
719
define i32 @fshr_i32_zero0_cst (i32 %a0 ) nounwind {
722
720
; X32-SSE2-LABEL: fshr_i32_zero0_cst:
723
721
; X32-SSE2: # %bb.0:
724
- ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
725
- ; X32-SSE2-NEXT: xorl %eax, %eax
726
- ; X32-SSE2-NEXT: shldl $23, %ecx, %eax
722
+ ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
723
+ ; X32-SSE2-NEXT: shrl $9, %eax
727
724
; X32-SSE2-NEXT: retl
728
725
;
729
726
; X64-AVX2-LABEL: fshr_i32_zero0_cst:
730
727
; X64-AVX2: # %bb.0:
731
- ; X64-AVX2-NEXT: xorl %eax , %eax
732
- ; X64-AVX2-NEXT: shldl $23, %edi , %eax
728
+ ; X64-AVX2-NEXT: movl %edi , %eax
729
+ ; X64-AVX2-NEXT: shrl $9 , %eax
733
730
; X64-AVX2-NEXT: retq
734
731
%res = call i32 @llvm.fshr.i32 (i32 0 , i32 %a0 , i32 9 )
735
732
ret i32 %res
@@ -758,15 +755,14 @@ define i32 @fshr_i32_zero1(i32 %a0, i32 %a1) nounwind {
758
755
define i32 @fshr_i32_zero1_cst (i32 %a0 ) nounwind {
759
756
; X32-SSE2-LABEL: fshr_i32_zero1_cst:
760
757
; X32-SSE2: # %bb.0:
761
- ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %ecx
762
- ; X32-SSE2-NEXT: xorl %eax, %eax
763
- ; X32-SSE2-NEXT: shrdl $9, %ecx, %eax
758
+ ; X32-SSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
759
+ ; X32-SSE2-NEXT: shll $23, %eax
764
760
; X32-SSE2-NEXT: retl
765
761
;
766
762
; X64-AVX2-LABEL: fshr_i32_zero1_cst:
767
763
; X64-AVX2: # %bb.0:
768
- ; X64-AVX2-NEXT: xorl %eax , %eax
769
- ; X64-AVX2-NEXT: shrdl $9, %edi , %eax
764
+ ; X64-AVX2-NEXT: movl %edi , %eax
765
+ ; X64-AVX2-NEXT: shll $23 , %eax
770
766
; X64-AVX2-NEXT: retq
771
767
%res = call i32 @llvm.fshr.i32 (i32 %a0 , i32 0 , i32 9 )
772
768
ret i32 %res
0 commit comments