2017-08-18 22:44:31 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=x86-64 -mattr=+movbe | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=atom | FileCheck %s --check-prefix=CHECK --check-prefix=ATOM
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=slm | FileCheck %s --check-prefix=CHECK --check-prefix=SLM
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL
|
2017-10-17 21:45:39 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=broadwell | FileCheck %s --check-prefix=CHECK --check-prefix=BROADWELL
|
2017-10-10 17:53:18 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE
|
2017-08-18 22:44:31 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=knl | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=btver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BTVER2
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=znver1 | FileCheck %s --check-prefix=CHECK --check-prefix=ZNVER1
|
|
|
|
|
2017-09-10 01:52:44 +08:00
|
|
|
define i16 @test_movbe_i16(i16 *%a0, i16 %a1, i16 *%a2) {
|
|
|
|
; GENERIC-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; GENERIC: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; GENERIC-NEXT: movbew (%rdi), %ax # sched: [5:0.50]
|
|
|
|
; GENERIC-NEXT: movbew %si, (%rdx) # sched: [1:1.00]
|
|
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; ATOM-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ATOM: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; ATOM-NEXT: movbew (%rdi), %ax # sched: [1:1.00]
|
|
|
|
; ATOM-NEXT: movbew %si, (%rdx) # sched: [1:1.00]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; SLM-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SLM: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; SLM-NEXT: movbew (%rdi), %ax # sched: [4:1.00]
|
|
|
|
; SLM-NEXT: movbew %si, (%rdx) # sched: [1:1.00]
|
|
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; HASWELL-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; HASWELL: # %bb.0:
|
2017-12-08 17:48:44 +08:00
|
|
|
; HASWELL-NEXT: movbew (%rdi), %ax # sched: [6:0.50]
|
|
|
|
; HASWELL-NEXT: movbew %si, (%rdx) # sched: [2:1.00]
|
|
|
|
; HASWELL-NEXT: retq # sched: [7:1.00]
|
2017-08-18 22:44:31 +08:00
|
|
|
;
|
2017-10-17 21:45:39 +08:00
|
|
|
; BROADWELL-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BROADWELL: # %bb.0:
|
2017-10-25 04:19:47 +08:00
|
|
|
; BROADWELL-NEXT: movbew (%rdi), %ax # sched: [6:0.50]
|
|
|
|
; BROADWELL-NEXT: movbew %si, (%rdx) # sched: [2:1.00]
|
|
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
2017-10-17 21:45:39 +08:00
|
|
|
;
|
2017-10-10 17:53:18 +08:00
|
|
|
; SKYLAKE-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SKYLAKE: # %bb.0:
|
2017-10-17 14:47:04 +08:00
|
|
|
; SKYLAKE-NEXT: movbew (%rdi), %ax # sched: [6:0.50]
|
|
|
|
; SKYLAKE-NEXT: movbew %si, (%rdx) # sched: [2:1.00]
|
|
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
2017-10-10 17:53:18 +08:00
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; BTVER2-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BTVER2: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; BTVER2-NEXT: movbew (%rdi), %ax # sched: [4:1.00]
|
|
|
|
; BTVER2-NEXT: movbew %si, (%rdx) # sched: [1:1.00]
|
|
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; ZNVER1-LABEL: test_movbe_i16:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ZNVER1: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; ZNVER1-NEXT: movbew (%rdi), %ax # sched: [5:0.50]
|
AMD family 17h (znver1) scheduler model update.
Summary:
This patch enables the following:
1) Regex based Instruction itineraries for integer instructions.
2) The instructions are grouped as per the nature of the instructions
(move, arithmetic, logic, Misc, Control Transfer).
3) FP instructions and their itineraries are added which includes values
for SSE4A, BMI, BMI2 and SHA instructions.
Patch by Ganesh Gopalasubramanian
Reviewers: RKSimon, craig.topper
Subscribers: vprasad, shivaram, ddibyend, andreadb, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D36617
llvm-svn: 312237
2017-08-31 20:38:35 +08:00
|
|
|
; ZNVER1-NEXT: movbew %si, (%rdx) # sched: [5:0.50]
|
|
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
2017-08-18 22:44:31 +08:00
|
|
|
%1 = load i16, i16 *%a0
|
|
|
|
%2 = tail call i16 @llvm.bswap.i16( i16 %1 )
|
|
|
|
%3 = tail call i16 @llvm.bswap.i16( i16 %a1 )
|
|
|
|
store i16 %3, i16* %a2, align 2
|
|
|
|
ret i16 %2
|
|
|
|
}
|
|
|
|
declare i16 @llvm.bswap.i16(i16)
|
|
|
|
|
2017-09-10 01:52:44 +08:00
|
|
|
define i32 @test_movbe_i32(i32 *%a0, i32 %a1, i32 *%a2) {
|
|
|
|
; GENERIC-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; GENERIC: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; GENERIC-NEXT: movbel (%rdi), %eax # sched: [5:0.50]
|
|
|
|
; GENERIC-NEXT: movbel %esi, (%rdx) # sched: [1:1.00]
|
|
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; ATOM-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ATOM: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; ATOM-NEXT: movbel (%rdi), %eax # sched: [1:1.00]
|
|
|
|
; ATOM-NEXT: movbel %esi, (%rdx) # sched: [1:1.00]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; SLM-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SLM: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; SLM-NEXT: movbel (%rdi), %eax # sched: [4:1.00]
|
|
|
|
; SLM-NEXT: movbel %esi, (%rdx) # sched: [1:1.00]
|
|
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; HASWELL-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; HASWELL: # %bb.0:
|
2017-12-08 17:48:44 +08:00
|
|
|
; HASWELL-NEXT: movbel (%rdi), %eax # sched: [6:0.50]
|
|
|
|
; HASWELL-NEXT: movbel %esi, (%rdx) # sched: [2:1.00]
|
|
|
|
; HASWELL-NEXT: retq # sched: [7:1.00]
|
2017-08-18 22:44:31 +08:00
|
|
|
;
|
2017-10-17 21:45:39 +08:00
|
|
|
; BROADWELL-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BROADWELL: # %bb.0:
|
2017-10-25 04:19:47 +08:00
|
|
|
; BROADWELL-NEXT: movbel (%rdi), %eax # sched: [6:0.50]
|
|
|
|
; BROADWELL-NEXT: movbel %esi, (%rdx) # sched: [2:1.00]
|
|
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
2017-10-17 21:45:39 +08:00
|
|
|
;
|
2017-10-10 17:53:18 +08:00
|
|
|
; SKYLAKE-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SKYLAKE: # %bb.0:
|
2017-10-17 14:47:04 +08:00
|
|
|
; SKYLAKE-NEXT: movbel (%rdi), %eax # sched: [6:0.50]
|
|
|
|
; SKYLAKE-NEXT: movbel %esi, (%rdx) # sched: [2:1.00]
|
|
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
2017-10-10 17:53:18 +08:00
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; BTVER2-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BTVER2: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; BTVER2-NEXT: movbel (%rdi), %eax # sched: [4:1.00]
|
|
|
|
; BTVER2-NEXT: movbel %esi, (%rdx) # sched: [1:1.00]
|
|
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; ZNVER1-LABEL: test_movbe_i32:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ZNVER1: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; ZNVER1-NEXT: movbel (%rdi), %eax # sched: [5:0.50]
|
AMD family 17h (znver1) scheduler model update.
Summary:
This patch enables the following:
1) Regex based Instruction itineraries for integer instructions.
2) The instructions are grouped as per the nature of the instructions
(move, arithmetic, logic, Misc, Control Transfer).
3) FP instructions and their itineraries are added which includes values
for SSE4A, BMI, BMI2 and SHA instructions.
Patch by Ganesh Gopalasubramanian
Reviewers: RKSimon, craig.topper
Subscribers: vprasad, shivaram, ddibyend, andreadb, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D36617
llvm-svn: 312237
2017-08-31 20:38:35 +08:00
|
|
|
; ZNVER1-NEXT: movbel %esi, (%rdx) # sched: [5:0.50]
|
|
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
2017-08-18 22:44:31 +08:00
|
|
|
%1 = load i32, i32 *%a0
|
|
|
|
%2 = tail call i32 @llvm.bswap.i32( i32 %1 )
|
|
|
|
%3 = tail call i32 @llvm.bswap.i32( i32 %a1 )
|
|
|
|
store i32 %3, i32* %a2, align 2
|
|
|
|
ret i32 %2
|
|
|
|
}
|
|
|
|
declare i32 @llvm.bswap.i32(i32)
|
|
|
|
|
2017-09-10 01:52:44 +08:00
|
|
|
define i64 @test_movbe_i64(i64 *%a0, i64 %a1, i64 *%a2) {
|
|
|
|
; GENERIC-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; GENERIC: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; GENERIC-NEXT: movbeq (%rdi), %rax # sched: [5:0.50]
|
|
|
|
; GENERIC-NEXT: movbeq %rsi, (%rdx) # sched: [1:1.00]
|
|
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; ATOM-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ATOM: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; ATOM-NEXT: movbeq (%rdi), %rax # sched: [1:1.00]
|
|
|
|
; ATOM-NEXT: movbeq %rsi, (%rdx) # sched: [1:1.00]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: nop # sched: [1:0.50]
|
|
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; SLM-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SLM: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; SLM-NEXT: movbeq (%rdi), %rax # sched: [4:1.00]
|
|
|
|
; SLM-NEXT: movbeq %rsi, (%rdx) # sched: [1:1.00]
|
|
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; HASWELL-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; HASWELL: # %bb.0:
|
2017-12-08 17:48:44 +08:00
|
|
|
; HASWELL-NEXT: movbeq (%rdi), %rax # sched: [6:0.50]
|
|
|
|
; HASWELL-NEXT: movbeq %rsi, (%rdx) # sched: [2:1.00]
|
|
|
|
; HASWELL-NEXT: retq # sched: [7:1.00]
|
2017-08-18 22:44:31 +08:00
|
|
|
;
|
2017-10-17 21:45:39 +08:00
|
|
|
; BROADWELL-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BROADWELL: # %bb.0:
|
2017-10-25 04:19:47 +08:00
|
|
|
; BROADWELL-NEXT: movbeq (%rdi), %rax # sched: [6:0.50]
|
|
|
|
; BROADWELL-NEXT: movbeq %rsi, (%rdx) # sched: [2:1.00]
|
|
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
2017-10-17 21:45:39 +08:00
|
|
|
;
|
2017-10-10 17:53:18 +08:00
|
|
|
; SKYLAKE-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; SKYLAKE: # %bb.0:
|
2017-10-17 14:47:04 +08:00
|
|
|
; SKYLAKE-NEXT: movbeq (%rdi), %rax # sched: [6:0.50]
|
|
|
|
; SKYLAKE-NEXT: movbeq %rsi, (%rdx) # sched: [2:1.00]
|
|
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
2017-10-10 17:53:18 +08:00
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; BTVER2-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; BTVER2: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; BTVER2-NEXT: movbeq (%rdi), %rax # sched: [4:1.00]
|
|
|
|
; BTVER2-NEXT: movbeq %rsi, (%rdx) # sched: [1:1.00]
|
|
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
|
|
;
|
2017-09-10 01:52:44 +08:00
|
|
|
; ZNVER1-LABEL: test_movbe_i64:
|
2017-12-05 01:18:51 +08:00
|
|
|
; ZNVER1: # %bb.0:
|
2017-08-18 22:44:31 +08:00
|
|
|
; ZNVER1-NEXT: movbeq (%rdi), %rax # sched: [5:0.50]
|
AMD family 17h (znver1) scheduler model update.
Summary:
This patch enables the following:
1) Regex based Instruction itineraries for integer instructions.
2) The instructions are grouped as per the nature of the instructions
(move, arithmetic, logic, Misc, Control Transfer).
3) FP instructions and their itineraries are added which includes values
for SSE4A, BMI, BMI2 and SHA instructions.
Patch by Ganesh Gopalasubramanian
Reviewers: RKSimon, craig.topper
Subscribers: vprasad, shivaram, ddibyend, andreadb, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D36617
llvm-svn: 312237
2017-08-31 20:38:35 +08:00
|
|
|
; ZNVER1-NEXT: movbeq %rsi, (%rdx) # sched: [5:0.50]
|
|
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
2017-08-18 22:44:31 +08:00
|
|
|
%1 = load i64, i64 *%a0
|
|
|
|
%2 = tail call i64 @llvm.bswap.i64( i64 %1 )
|
|
|
|
%3 = tail call i64 @llvm.bswap.i64( i64 %a1 )
|
|
|
|
store i64 %3, i64* %a2, align 2
|
|
|
|
ret i64 %2
|
|
|
|
}
|
|
|
|
declare i64 @llvm.bswap.i64(i64)
|