1 ; RUN: llc < %s -march=x86-64 -mcpu=corei7 > %t
2 ; RUN: grep rol %t | count 5
3 ; RUN: grep ror %t | count 1
4 ; RUN: grep shld %t | count 2
5 ; RUN: grep shrd %t | count 2
6 ; RUN: llc < %s -march=x86-64 -mcpu=core-avx2 | FileCheck %s --check-prefix=BMI2
8 define i64 @foo(i64 %x, i64 %y, i64 %z) nounwind readnone {
17 define i64 @bar(i64 %x, i64 %y, i64 %z) nounwind readnone {
26 define i64 @un(i64 %x, i64 %y, i64 %z) nounwind readnone {
35 define i64 @bu(i64 %x, i64 %y, i64 %z) nounwind readnone {
44 define i64 @xfoo(i64 %x, i64 %y, i64 %z) nounwind readnone {
54 define i64 @xfoop(i64* %p) nounwind readnone {
57 ; BMI2: rorxq $57, ({{.+}}), %{{.+}}
58 %x = load i64, i64* %p
65 define i64 @xbar(i64 %x, i64 %y, i64 %z) nounwind readnone {
73 define i64 @xun(i64 %x, i64 %y, i64 %z) nounwind readnone {
83 define i64 @xunp(i64* %p) nounwind readnone {
86 ; BMI2: rorxq $7, ({{.+}}), %{{.+}}
87 %x = load i64, i64* %p
94 define i64 @xbu(i64 %x, i64 %y, i64 %z) nounwind readnone {