Test 221067 in a fixed-target test so as not to fail on targets with different DWARF...
[oota-llvm.git] / test / CodeGen / X86 / rotate4.ll
index 31069899195b75bdf1cf09945a41352fdf1448bf..5372612aeab80033c6e06e9dac6ddb817796773e 100644 (file)
@@ -1,10 +1,11 @@
 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=generic | FileCheck %s
 
 ; Check that we recognize this idiom for rotation too:
-;    a << (b & 31) | a >> ((0 - b) & 31)
+;    a << (b & (OpSize-1)) | a >> ((0 - b) & (OpSize-1))
 
 define i32 @rotate_left_32(i32 %a, i32 %b) {
 ; CHECK-LABEL: rotate_left_32:
+; CHECK-NOT: and
 ; CHECK: roll
 entry:
   %and = and i32 %b, 31
@@ -18,6 +19,7 @@ entry:
 
 define i32 @rotate_right_32(i32 %a, i32 %b) {
 ; CHECK-LABEL: rotate_right_32:
+; CHECK-NOT: and
 ; CHECK: rorl
 entry:
   %and = and i32 %b, 31
@@ -31,6 +33,7 @@ entry:
 
 define i64 @rotate_left_64(i64 %a, i64 %b) {
 ; CHECK-LABEL: rotate_left_64:
+; CHECK-NOT: and
 ; CHECK: rolq
 entry:
   %and = and i64 %b, 63
@@ -44,6 +47,7 @@ entry:
 
 define i64 @rotate_right_64(i64 %a, i64 %b) {
 ; CHECK-LABEL: rotate_right_64:
+; CHECK-NOT: and
 ; CHECK: rorq
 entry:
   %and = and i64 %b, 63
@@ -59,6 +63,7 @@ entry:
 
 define void @rotate_left_m32(i32 *%pa, i32 %b) {
 ; CHECK-LABEL: rotate_left_m32:
+; CHECK-NOT: and
 ; CHECK: roll
 ; no store:
 ; CHECK-NOT: mov
@@ -76,6 +81,7 @@ entry:
 
 define void @rotate_right_m32(i32 *%pa, i32 %b) {
 ; CHECK-LABEL: rotate_right_m32:
+; CHECK-NOT: and
 ; CHECK: rorl
 ; no store:
 ; CHECK-NOT: mov
@@ -93,6 +99,7 @@ entry:
 
 define void @rotate_left_m64(i64 *%pa, i64 %b) {
 ; CHECK-LABEL: rotate_left_m64:
+; CHECK-NOT: and
 ; CHECK: rolq
 ; no store:
 ; CHECK-NOT: mov
@@ -110,6 +117,7 @@ entry:
 
 define void @rotate_right_m64(i64 *%pa, i64 %b) {
 ; CHECK-LABEL: rotate_right_m64:
+; CHECK-NOT: and
 ; CHECK: rorq
 ; no store:
 ; CHECK-NOT: mov