2017-09-05 20:28:30 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-- -mcpu=corei7 | FileCheck %s --check-prefix=ALL --check-prefix=X64
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-- -mcpu=corei7-avx | FileCheck %s --check-prefix=ALL --check-prefix=SHLD
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-- -mcpu=core-avx2 | FileCheck %s --check-prefix=ALL --check-prefix=BMI2
|
2008-10-17 09:23:35 +08:00
|
|
|
|
|
|
|
define i64 @foo(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-LABEL: foo:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ALL: # %bb.0: # %entry
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: movq %rdx, %rcx
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: movq %rdi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: # kill: def $cl killed $cl killed $rcx
|
|
|
|
; ALL-NEXT: rolq %cl, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: retq
|
2008-10-17 09:23:35 +08:00
|
|
|
entry:
|
|
|
|
%0 = shl i64 %x, %z
|
|
|
|
%1 = sub i64 64, %z
|
|
|
|
%2 = lshr i64 %x, %1
|
|
|
|
%3 = or i64 %2, %0
|
|
|
|
ret i64 %3
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @bar(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-LABEL: bar:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ALL: # %bb.0: # %entry
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: movq %rdx, %rcx
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: movq %rsi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: # kill: def $cl killed $cl killed $rcx
|
|
|
|
; ALL-NEXT: shldq %cl, %rdi, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: retq
|
2008-10-17 09:23:35 +08:00
|
|
|
entry:
|
|
|
|
%0 = shl i64 %y, %z
|
|
|
|
%1 = sub i64 64, %z
|
|
|
|
%2 = lshr i64 %x, %1
|
|
|
|
%3 = or i64 %2, %0
|
|
|
|
ret i64 %3
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @un(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-LABEL: un:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ALL: # %bb.0: # %entry
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: movq %rdx, %rcx
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: movq %rdi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: # kill: def $cl killed $cl killed $rcx
|
|
|
|
; ALL-NEXT: rorq %cl, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: retq
|
2008-10-17 09:23:35 +08:00
|
|
|
entry:
|
|
|
|
%0 = lshr i64 %x, %z
|
|
|
|
%1 = sub i64 64, %z
|
|
|
|
%2 = shl i64 %x, %1
|
|
|
|
%3 = or i64 %2, %0
|
|
|
|
ret i64 %3
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @bu(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-LABEL: bu:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ALL: # %bb.0: # %entry
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: movq %rdx, %rcx
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: movq %rsi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: # kill: def $cl killed $cl killed $rcx
|
|
|
|
; ALL-NEXT: shrdq %cl, %rdi, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: retq
|
2008-10-17 09:23:35 +08:00
|
|
|
entry:
|
|
|
|
%0 = lshr i64 %y, %z
|
|
|
|
%1 = sub i64 64, %z
|
|
|
|
%2 = shl i64 %x, %1
|
|
|
|
%3 = or i64 %2, %0
|
|
|
|
ret i64 %3
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @xfoo(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-LABEL: xfoo:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-NEXT: movq %rdi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; X64-NEXT: rolq $7, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
2017-02-21 14:39:13 +08:00
|
|
|
; SHLD-LABEL: xfoo:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SHLD: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shldq $7, %rax, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
2013-07-14 14:24:09 +08:00
|
|
|
; BMI2-LABEL: xfoo:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BMI2: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; BMI2-NEXT: rorxq $57, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
entry:
|
2008-10-17 09:23:35 +08:00
|
|
|
%0 = lshr i64 %x, 57
|
|
|
|
%1 = shl i64 %x, 7
|
|
|
|
%2 = or i64 %0, %1
|
|
|
|
ret i64 %2
|
|
|
|
}
|
|
|
|
|
2012-09-26 16:24:51 +08:00
|
|
|
define i64 @xfoop(i64* %p) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-LABEL: xfoop:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-NEXT: movq (%rdi), %rax
|
|
|
|
; X64-NEXT: rolq $7, %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
2017-02-21 14:39:13 +08:00
|
|
|
; SHLD-LABEL: xfoop:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SHLD: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; SHLD-NEXT: movq (%rdi), %rax
|
|
|
|
; SHLD-NEXT: shldq $7, %rax, %rax
|
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
2013-07-14 14:24:09 +08:00
|
|
|
; BMI2-LABEL: xfoop:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BMI2: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; BMI2-NEXT: rorxq $57, (%rdi), %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%x = load i64, i64* %p
|
2012-09-26 16:24:51 +08:00
|
|
|
%a = lshr i64 %x, 57
|
|
|
|
%b = shl i64 %x, 7
|
|
|
|
%c = or i64 %a, %b
|
|
|
|
ret i64 %c
|
|
|
|
}
|
|
|
|
|
2008-10-17 09:23:35 +08:00
|
|
|
define i64 @xbar(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-LABEL: xbar:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ALL: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: movq %rdi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: shrdq $57, %rsi, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: retq
|
2008-10-17 09:23:35 +08:00
|
|
|
entry:
|
|
|
|
%0 = shl i64 %y, 7
|
|
|
|
%1 = lshr i64 %x, 57
|
|
|
|
%2 = or i64 %0, %1
|
|
|
|
ret i64 %2
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @xun(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-LABEL: xun:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-NEXT: movq %rdi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; X64-NEXT: rolq $57, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
2017-02-21 14:39:13 +08:00
|
|
|
; SHLD-LABEL: xun:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SHLD: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shldq $57, %rax, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
2013-07-14 14:24:09 +08:00
|
|
|
; BMI2-LABEL: xun:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BMI2: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; BMI2-NEXT: rorxq $7, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
entry:
|
2008-10-17 09:23:35 +08:00
|
|
|
%0 = lshr i64 %x, 7
|
|
|
|
%1 = shl i64 %x, 57
|
|
|
|
%2 = or i64 %0, %1
|
|
|
|
ret i64 %2
|
|
|
|
}
|
|
|
|
|
2012-09-26 16:24:51 +08:00
|
|
|
define i64 @xunp(i64* %p) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-LABEL: xunp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; X64-NEXT: movq (%rdi), %rax
|
|
|
|
; X64-NEXT: rolq $57, %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
2017-02-21 14:39:13 +08:00
|
|
|
; SHLD-LABEL: xunp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SHLD: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; SHLD-NEXT: movq (%rdi), %rax
|
|
|
|
; SHLD-NEXT: shldq $57, %rax, %rax
|
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
2013-07-14 14:24:09 +08:00
|
|
|
; BMI2-LABEL: xunp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BMI2: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; BMI2-NEXT: rorxq $7, (%rdi), %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%x = load i64, i64* %p
|
2012-09-26 16:24:51 +08:00
|
|
|
%a = lshr i64 %x, 7
|
|
|
|
%b = shl i64 %x, 57
|
|
|
|
%c = or i64 %a, %b
|
|
|
|
ret i64 %c
|
|
|
|
}
|
|
|
|
|
2008-10-17 09:23:35 +08:00
|
|
|
define i64 @xbu(i64 %x, i64 %y, i64 %z) nounwind readnone {
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-LABEL: xbu:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ALL: # %bb.0: # %entry
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: movq %rdi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; ALL-NEXT: shldq $57, %rsi, %rax
|
2017-09-05 20:28:30 +08:00
|
|
|
; ALL-NEXT: retq
|
2008-10-17 09:23:35 +08:00
|
|
|
entry:
|
|
|
|
%0 = lshr i64 %y, 7
|
|
|
|
%1 = shl i64 %x, 57
|
|
|
|
%2 = or i64 %0, %1
|
|
|
|
ret i64 %2
|
|
|
|
}
|
2019-03-14 15:07:24 +08:00
|
|
|
|
|
|
|
define i64 @fshl(i64 %x) nounwind {
|
|
|
|
; X64-LABEL: fshl:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq %rdi, %rax
|
|
|
|
; X64-NEXT: rolq $7, %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshl:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shldq $7, %rax, %rax
|
2019-03-14 15:07:24 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshl:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $57, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
%f = call i64 @llvm.fshl.i64(i64 %x, i64 %x, i64 7)
|
|
|
|
ret i64 %f
|
|
|
|
}
|
|
|
|
declare i64 @llvm.fshl.i64(i64, i64, i64)
|
|
|
|
|
|
|
|
define i64 @fshl1(i64 %x) nounwind {
|
|
|
|
; X64-LABEL: fshl1:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq %rdi, %rax
|
|
|
|
; X64-NEXT: rolq %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshl1:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shldq $1, %rax, %rax
|
2019-03-14 15:07:24 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshl1:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $63, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
%f = call i64 @llvm.fshl.i64(i64 %x, i64 %x, i64 1)
|
|
|
|
ret i64 %f
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @fshl63(i64 %x) nounwind {
|
|
|
|
; X64-LABEL: fshl63:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq %rdi, %rax
|
|
|
|
; X64-NEXT: rorq %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshl63:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shldq $63, %rax, %rax
|
2019-03-14 15:07:24 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshl63:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $1, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
%f = call i64 @llvm.fshl.i64(i64 %x, i64 %x, i64 63)
|
|
|
|
ret i64 %f
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @fshl_load(i64* %p) nounwind {
|
|
|
|
; X64-LABEL: fshl_load:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq (%rdi), %rax
|
|
|
|
; X64-NEXT: rolq $7, %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshl_load:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq (%rdi), %rax
|
|
|
|
; SHLD-NEXT: shldq $7, %rax, %rax
|
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshl_load:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $57, (%rdi), %rax
|
|
|
|
; BMI2-NEXT: retq
|
|
|
|
%x = load i64, i64* %p
|
|
|
|
%f = call i64 @llvm.fshl.i64(i64 %x, i64 %x, i64 7)
|
|
|
|
ret i64 %f
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @fshr(i64 %x) nounwind {
|
2019-03-14 15:07:26 +08:00
|
|
|
; X64-LABEL: fshr:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq %rdi, %rax
|
|
|
|
; X64-NEXT: rorq $7, %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshr:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shrdq $7, %rax, %rax
|
2019-03-14 15:07:26 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshr:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $7, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
2019-03-14 15:07:24 +08:00
|
|
|
%f = call i64 @llvm.fshr.i64(i64 %x, i64 %x, i64 7)
|
|
|
|
ret i64 %f
|
|
|
|
}
|
|
|
|
declare i64 @llvm.fshr.i64(i64, i64, i64)
|
|
|
|
|
|
|
|
define i64 @fshr1(i64 %x) nounwind {
|
2019-03-14 15:07:26 +08:00
|
|
|
; X64-LABEL: fshr1:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq %rdi, %rax
|
2019-03-15 00:53:24 +08:00
|
|
|
; X64-NEXT: rorq %rax
|
2019-03-14 15:07:26 +08:00
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshr1:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shrdq $1, %rax, %rax
|
2019-03-14 15:07:26 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshr1:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $1, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
2019-03-14 15:07:24 +08:00
|
|
|
%f = call i64 @llvm.fshr.i64(i64 %x, i64 %x, i64 1)
|
|
|
|
ret i64 %f
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @fshr63(i64 %x) nounwind {
|
2019-03-14 15:07:26 +08:00
|
|
|
; X64-LABEL: fshr63:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq %rdi, %rax
|
|
|
|
; X64-NEXT: rolq %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshr63:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq %rdi, %rax
|
2019-03-28 01:29:34 +08:00
|
|
|
; SHLD-NEXT: shrdq $63, %rax, %rax
|
2019-03-14 15:07:26 +08:00
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshr63:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $63, %rdi, %rax
|
|
|
|
; BMI2-NEXT: retq
|
2019-03-14 15:07:24 +08:00
|
|
|
%f = call i64 @llvm.fshr.i64(i64 %x, i64 %x, i64 63)
|
|
|
|
ret i64 %f
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @fshr_load(i64* %p) nounwind {
|
2019-03-14 15:07:26 +08:00
|
|
|
; X64-LABEL: fshr_load:
|
|
|
|
; X64: # %bb.0:
|
|
|
|
; X64-NEXT: movq (%rdi), %rax
|
|
|
|
; X64-NEXT: rorq $7, %rax
|
|
|
|
; X64-NEXT: retq
|
|
|
|
;
|
|
|
|
; SHLD-LABEL: fshr_load:
|
|
|
|
; SHLD: # %bb.0:
|
|
|
|
; SHLD-NEXT: movq (%rdi), %rax
|
|
|
|
; SHLD-NEXT: shrdq $7, %rax, %rax
|
|
|
|
; SHLD-NEXT: retq
|
|
|
|
;
|
|
|
|
; BMI2-LABEL: fshr_load:
|
|
|
|
; BMI2: # %bb.0:
|
|
|
|
; BMI2-NEXT: rorxq $7, (%rdi), %rax
|
|
|
|
; BMI2-NEXT: retq
|
2019-03-14 15:07:24 +08:00
|
|
|
%x = load i64, i64* %p
|
|
|
|
%f = call i64 @llvm.fshr.i64(i64 %x, i64 %x, i64 7)
|
|
|
|
ret i64 %f
|
|
|
|
}
|