// We prefer rotate for vectors of if we won't get a zext mask with SRL
// (PreferRotate will be set in the latter case).
- if (PreferRotate || VT.isVector())
+ if (PreferRotate || !MayTransformRotate || VT.isVector())
return ShiftOpc;
// Non-vector type and we have a zext mask with SRL.
define i32 @issue108722(i32 %0) {
; CHECK-NOBMI-LABEL: issue108722:
; CHECK-NOBMI: # %bb.0:
-; CHECK-NOBMI-NEXT: movzbl %dil, %ecx
-; CHECK-NOBMI-NEXT: shrl $24, %edi
+; CHECK-NOBMI-NEXT: movl %edi, %ecx
+; CHECK-NOBMI-NEXT: roll $24, %ecx
; CHECK-NOBMI-NEXT: xorl %eax, %eax
; CHECK-NOBMI-NEXT: cmpl %edi, %ecx
; CHECK-NOBMI-NEXT: sete %al