forked from OSchip/llvm-project
1793 lines
61 KiB
LLVM
1793 lines
61 KiB
LLVM
; 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 | 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=sandybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=ivybridge | FileCheck %s --check-prefix=CHECK --check-prefix=SANDY
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=haswell | FileCheck %s --check-prefix=CHECK --check-prefix=HASWELL
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=broadwell | FileCheck %s --check-prefix=CHECK --check-prefix=BROADWELL
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skylake | FileCheck %s --check-prefix=CHECK --check-prefix=SKYLAKE
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -print-schedule -mcpu=skx | FileCheck %s --check-prefix=CHECK --check-prefix=SKX
|
|
; 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
|
|
|
|
; TODO - test_adc
|
|
; TODO - test_add
|
|
; TODO - test_and
|
|
|
|
define i16 @test_bsf16(i16 %a0, i16* %a1) optsize {
|
|
; GENERIC-LABEL: test_bsf16:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: bsfw %di, %ax # sched: [3:1.00]
|
|
; GENERIC-NEXT: bsfw (%rsi), %cx # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; GENERIC-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bsf16:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: bsfw %di, %ax # sched: [16:8.00]
|
|
; ATOM-NEXT: bsfw (%rsi), %cx # sched: [16:8.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; ATOM-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bsf16:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: bsfw %di, %ax # sched: [1:1.00]
|
|
; SLM-NEXT: bsfw (%rsi), %cx # sched: [4:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; SLM-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bsf16:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: bsfw %di, %ax # sched: [3:1.00]
|
|
; SANDY-NEXT: bsfw (%rsi), %cx # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; SANDY-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bsf16:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: bsfw %di, %ax # sched: [3:1.00]
|
|
; HASWELL-NEXT: bsfw (%rsi), %cx # sched: [3:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; HASWELL-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bsf16:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: bsfw %di, %ax # sched: [3:1.00]
|
|
; BROADWELL-NEXT: bsfw (%rsi), %cx # sched: [8:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bsf16:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: bsfw %di, %ax # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: bsfw (%rsi), %cx # sched: [8:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bsf16:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: bsfw %di, %ax # sched: [3:1.00]
|
|
; SKX-NEXT: bsfw (%rsi), %cx # sched: [8:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKX-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bsf16:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: bsfw %di, %ax # sched: [1:0.50]
|
|
; BTVER2-NEXT: bsfw (%rsi), %cx # sched: [4:1.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; BTVER2-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bsf16:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: bsfw %di, %ax # sched: [3:0.25]
|
|
; ZNVER1-NEXT: bsfw (%rsi), %cx # sched: [7:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = call { i16, i16 } asm sideeffect "bsf $2, $0 \0A\09 bsf $3, $1", "=r,=r,r,*m,~{dirflag},~{fpsr},~{flags}"(i16 %a0, i16* %a1)
|
|
%2 = extractvalue { i16, i16 } %1, 0
|
|
%3 = extractvalue { i16, i16 } %1, 1
|
|
%4 = or i16 %2, %3
|
|
ret i16 %4
|
|
}
|
|
define i32 @test_bsf32(i32 %a0, i32* %a1) optsize {
|
|
; GENERIC-LABEL: test_bsf32:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: bsfl %edi, %eax # sched: [3:1.00]
|
|
; GENERIC-NEXT: bsfl (%rsi), %ecx # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bsf32:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: bsfl %edi, %eax # sched: [16:8.00]
|
|
; ATOM-NEXT: bsfl (%rsi), %ecx # sched: [16:8.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bsf32:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: bsfl %edi, %eax # sched: [1:1.00]
|
|
; SLM-NEXT: bsfl (%rsi), %ecx # sched: [4:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bsf32:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: bsfl %edi, %eax # sched: [3:1.00]
|
|
; SANDY-NEXT: bsfl (%rsi), %ecx # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bsf32:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: bsfl %edi, %eax # sched: [3:1.00]
|
|
; HASWELL-NEXT: bsfl (%rsi), %ecx # sched: [3:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bsf32:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: bsfl %edi, %eax # sched: [3:1.00]
|
|
; BROADWELL-NEXT: bsfl (%rsi), %ecx # sched: [8:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bsf32:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: bsfl %edi, %eax # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: bsfl (%rsi), %ecx # sched: [8:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bsf32:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: bsfl %edi, %eax # sched: [3:1.00]
|
|
; SKX-NEXT: bsfl (%rsi), %ecx # sched: [8:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bsf32:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: bsfl %edi, %eax # sched: [1:0.50]
|
|
; BTVER2-NEXT: bsfl (%rsi), %ecx # sched: [4:1.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bsf32:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: bsfl %edi, %eax # sched: [3:0.25]
|
|
; ZNVER1-NEXT: bsfl (%rsi), %ecx # sched: [7:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = call { i32, i32 } asm sideeffect "bsf $2, $0 \0A\09 bsf $3, $1", "=r,=r,r,*m,~{dirflag},~{fpsr},~{flags}"(i32 %a0, i32* %a1)
|
|
%2 = extractvalue { i32, i32 } %1, 0
|
|
%3 = extractvalue { i32, i32 } %1, 1
|
|
%4 = or i32 %2, %3
|
|
ret i32 %4
|
|
}
|
|
define i64 @test_bsf64(i64 %a0, i64* %a1) optsize {
|
|
; GENERIC-LABEL: test_bsf64:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: bsfq %rdi, %rax # sched: [3:1.00]
|
|
; GENERIC-NEXT: bsfq (%rsi), %rcx # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: orq %rcx, %rax # sched: [1:0.33]
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bsf64:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: bsfq %rdi, %rax # sched: [16:8.00]
|
|
; ATOM-NEXT: bsfq (%rsi), %rcx # sched: [16:8.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: orq %rcx, %rax # sched: [1:0.50]
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bsf64:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: bsfq %rdi, %rax # sched: [1:1.00]
|
|
; SLM-NEXT: bsfq (%rsi), %rcx # sched: [4:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: orq %rcx, %rax # sched: [1:0.50]
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bsf64:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: bsfq %rdi, %rax # sched: [3:1.00]
|
|
; SANDY-NEXT: bsfq (%rsi), %rcx # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: orq %rcx, %rax # sched: [1:0.33]
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bsf64:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: bsfq %rdi, %rax # sched: [3:1.00]
|
|
; HASWELL-NEXT: bsfq (%rsi), %rcx # sched: [3:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bsf64:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: bsfq %rdi, %rax # sched: [3:1.00]
|
|
; BROADWELL-NEXT: bsfq (%rsi), %rcx # sched: [8:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bsf64:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: bsfq %rdi, %rax # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: bsfq (%rsi), %rcx # sched: [8:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bsf64:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: bsfq %rdi, %rax # sched: [3:1.00]
|
|
; SKX-NEXT: bsfq (%rsi), %rcx # sched: [8:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bsf64:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: bsfq %rdi, %rax # sched: [1:0.50]
|
|
; BTVER2-NEXT: bsfq (%rsi), %rcx # sched: [4:1.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: orq %rcx, %rax # sched: [1:0.50]
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bsf64:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: bsfq %rdi, %rax # sched: [3:0.25]
|
|
; ZNVER1-NEXT: bsfq (%rsi), %rcx # sched: [7:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = call { i64, i64 } asm sideeffect "bsf $2, $0 \0A\09 bsf $3, $1", "=r,=r,r,*m,~{dirflag},~{fpsr},~{flags}"(i64 %a0, i64* %a1)
|
|
%2 = extractvalue { i64, i64 } %1, 0
|
|
%3 = extractvalue { i64, i64 } %1, 1
|
|
%4 = or i64 %2, %3
|
|
ret i64 %4
|
|
}
|
|
|
|
define i16 @test_bsr16(i16 %a0, i16* %a1) optsize {
|
|
; GENERIC-LABEL: test_bsr16:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: bsrw %di, %ax # sched: [3:1.00]
|
|
; GENERIC-NEXT: bsrw (%rsi), %cx # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; GENERIC-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bsr16:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: bsrw %di, %ax # sched: [16:8.00]
|
|
; ATOM-NEXT: bsrw (%rsi), %cx # sched: [16:8.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; ATOM-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bsr16:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: bsrw %di, %ax # sched: [1:1.00]
|
|
; SLM-NEXT: bsrw (%rsi), %cx # sched: [4:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; SLM-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bsr16:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: bsrw %di, %ax # sched: [3:1.00]
|
|
; SANDY-NEXT: bsrw (%rsi), %cx # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; SANDY-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bsr16:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: bsrw %di, %ax # sched: [3:1.00]
|
|
; HASWELL-NEXT: bsrw (%rsi), %cx # sched: [3:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; HASWELL-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bsr16:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: bsrw %di, %ax # sched: [3:1.00]
|
|
; BROADWELL-NEXT: bsrw (%rsi), %cx # sched: [8:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bsr16:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: bsrw %di, %ax # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: bsrw (%rsi), %cx # sched: [8:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bsr16:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: bsrw %di, %ax # sched: [3:1.00]
|
|
; SKX-NEXT: bsrw (%rsi), %cx # sched: [8:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKX-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bsr16:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: bsrw %di, %ax # sched: [1:0.50]
|
|
; BTVER2-NEXT: bsrw (%rsi), %cx # sched: [4:1.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; BTVER2-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bsr16:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: bsrw %di, %ax # sched: [3:0.25]
|
|
; ZNVER1-NEXT: bsrw (%rsi), %cx # sched: [7:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: # kill: def %ax killed %ax killed %eax
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = call { i16, i16 } asm sideeffect "bsr $2, $0 \0A\09 bsr $3, $1", "=r,=r,r,*m,~{dirflag},~{fpsr},~{flags}"(i16 %a0, i16* %a1)
|
|
%2 = extractvalue { i16, i16 } %1, 0
|
|
%3 = extractvalue { i16, i16 } %1, 1
|
|
%4 = or i16 %2, %3
|
|
ret i16 %4
|
|
}
|
|
define i32 @test_bsr32(i32 %a0, i32* %a1) optsize {
|
|
; GENERIC-LABEL: test_bsr32:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: bsrl %edi, %eax # sched: [3:1.00]
|
|
; GENERIC-NEXT: bsrl (%rsi), %ecx # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bsr32:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: bsrl %edi, %eax # sched: [16:8.00]
|
|
; ATOM-NEXT: bsrl (%rsi), %ecx # sched: [16:8.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bsr32:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: bsrl %edi, %eax # sched: [1:1.00]
|
|
; SLM-NEXT: bsrl (%rsi), %ecx # sched: [4:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bsr32:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: bsrl %edi, %eax # sched: [3:1.00]
|
|
; SANDY-NEXT: bsrl (%rsi), %ecx # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: orl %ecx, %eax # sched: [1:0.33]
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bsr32:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: bsrl %edi, %eax # sched: [3:1.00]
|
|
; HASWELL-NEXT: bsrl (%rsi), %ecx # sched: [3:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bsr32:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: bsrl %edi, %eax # sched: [3:1.00]
|
|
; BROADWELL-NEXT: bsrl (%rsi), %ecx # sched: [8:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bsr32:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: bsrl %edi, %eax # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: bsrl (%rsi), %ecx # sched: [8:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bsr32:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: bsrl %edi, %eax # sched: [3:1.00]
|
|
; SKX-NEXT: bsrl (%rsi), %ecx # sched: [8:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bsr32:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: bsrl %edi, %eax # sched: [1:0.50]
|
|
; BTVER2-NEXT: bsrl (%rsi), %ecx # sched: [4:1.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bsr32:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: bsrl %edi, %eax # sched: [3:0.25]
|
|
; ZNVER1-NEXT: bsrl (%rsi), %ecx # sched: [7:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: orl %ecx, %eax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = call { i32, i32 } asm sideeffect "bsr $2, $0 \0A\09 bsr $3, $1", "=r,=r,r,*m,~{dirflag},~{fpsr},~{flags}"(i32 %a0, i32* %a1)
|
|
%2 = extractvalue { i32, i32 } %1, 0
|
|
%3 = extractvalue { i32, i32 } %1, 1
|
|
%4 = or i32 %2, %3
|
|
ret i32 %4
|
|
}
|
|
define i64 @test_bsr64(i64 %a0, i64* %a1) optsize {
|
|
; GENERIC-LABEL: test_bsr64:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: bsrq %rdi, %rax # sched: [3:1.00]
|
|
; GENERIC-NEXT: bsrq (%rsi), %rcx # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: orq %rcx, %rax # sched: [1:0.33]
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bsr64:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: bsrq %rdi, %rax # sched: [16:8.00]
|
|
; ATOM-NEXT: bsrq (%rsi), %rcx # sched: [16:8.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: orq %rcx, %rax # sched: [1:0.50]
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bsr64:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: bsrq %rdi, %rax # sched: [1:1.00]
|
|
; SLM-NEXT: bsrq (%rsi), %rcx # sched: [4:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: orq %rcx, %rax # sched: [1:0.50]
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bsr64:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: bsrq %rdi, %rax # sched: [3:1.00]
|
|
; SANDY-NEXT: bsrq (%rsi), %rcx # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: orq %rcx, %rax # sched: [1:0.33]
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bsr64:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: bsrq %rdi, %rax # sched: [3:1.00]
|
|
; HASWELL-NEXT: bsrq (%rsi), %rcx # sched: [3:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bsr64:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: bsrq %rdi, %rax # sched: [3:1.00]
|
|
; BROADWELL-NEXT: bsrq (%rsi), %rcx # sched: [8:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bsr64:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: bsrq %rdi, %rax # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: bsrq (%rsi), %rcx # sched: [8:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bsr64:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: bsrq %rdi, %rax # sched: [3:1.00]
|
|
; SKX-NEXT: bsrq (%rsi), %rcx # sched: [8:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bsr64:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: bsrq %rdi, %rax # sched: [1:0.50]
|
|
; BTVER2-NEXT: bsrq (%rsi), %rcx # sched: [4:1.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: orq %rcx, %rax # sched: [1:0.50]
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bsr64:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: bsrq %rdi, %rax # sched: [3:0.25]
|
|
; ZNVER1-NEXT: bsrq (%rsi), %rcx # sched: [7:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: orq %rcx, %rax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = call { i64, i64 } asm sideeffect "bsr $2, $0 \0A\09 bsr $3, $1", "=r,=r,r,*m,~{dirflag},~{fpsr},~{flags}"(i64 %a0, i64* %a1)
|
|
%2 = extractvalue { i64, i64 } %1, 0
|
|
%3 = extractvalue { i64, i64 } %1, 1
|
|
%4 = or i64 %2, %3
|
|
ret i64 %4
|
|
}
|
|
|
|
define i32 @test_bswap32(i32 %a0) optsize {
|
|
; GENERIC-LABEL: test_bswap32:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: bswapl %edi # sched: [2:1.00]
|
|
; GENERIC-NEXT: movl %edi, %eax # sched: [1:0.33]
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bswap32:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: bswapl %edi # sched: [1:1.00]
|
|
; ATOM-NEXT: movl %edi, %eax # sched: [1:0.50]
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bswap32:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: bswapl %edi # sched: [1:0.50]
|
|
; SLM-NEXT: movl %edi, %eax # sched: [1:0.50]
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bswap32:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: bswapl %edi # sched: [2:1.00]
|
|
; SANDY-NEXT: movl %edi, %eax # sched: [1:0.33]
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bswap32:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: bswapl %edi # sched: [2:0.50]
|
|
; HASWELL-NEXT: movl %edi, %eax # sched: [1:0.25]
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bswap32:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: bswapl %edi # sched: [2:0.50]
|
|
; BROADWELL-NEXT: movl %edi, %eax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bswap32:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: bswapl %edi # sched: [2:0.50]
|
|
; SKYLAKE-NEXT: movl %edi, %eax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bswap32:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: bswapl %edi # sched: [2:0.50]
|
|
; SKX-NEXT: movl %edi, %eax # sched: [1:0.25]
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bswap32:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: bswapl %edi # sched: [1:0.50]
|
|
; BTVER2-NEXT: movl %edi, %eax # sched: [1:0.50]
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bswap32:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: bswapl %edi # sched: [1:1.00]
|
|
; ZNVER1-NEXT: movl %edi, %eax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = tail call i32 asm "bswap $0", "=r,0"(i32 %a0) nounwind
|
|
ret i32 %1
|
|
}
|
|
define i64 @test_bswap64(i64 %a0) optsize {
|
|
; GENERIC-LABEL: test_bswap64:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: bswapq %rdi # sched: [2:1.00]
|
|
; GENERIC-NEXT: movq %rdi, %rax # sched: [1:0.33]
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_bswap64:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: bswapq %rdi # sched: [1:1.00]
|
|
; ATOM-NEXT: movq %rdi, %rax # sched: [1:0.50]
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_bswap64:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: bswapq %rdi # sched: [1:0.50]
|
|
; SLM-NEXT: movq %rdi, %rax # sched: [1:0.50]
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_bswap64:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: bswapq %rdi # sched: [2:1.00]
|
|
; SANDY-NEXT: movq %rdi, %rax # sched: [1:0.33]
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_bswap64:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: bswapq %rdi # sched: [2:0.50]
|
|
; HASWELL-NEXT: movq %rdi, %rax # sched: [1:0.25]
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_bswap64:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: bswapq %rdi # sched: [2:0.50]
|
|
; BROADWELL-NEXT: movq %rdi, %rax # sched: [1:0.25]
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_bswap64:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: bswapq %rdi # sched: [2:0.50]
|
|
; SKYLAKE-NEXT: movq %rdi, %rax # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_bswap64:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: bswapq %rdi # sched: [2:0.50]
|
|
; SKX-NEXT: movq %rdi, %rax # sched: [1:0.25]
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_bswap64:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: bswapq %rdi # sched: [1:0.50]
|
|
; BTVER2-NEXT: movq %rdi, %rax # sched: [1:0.50]
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_bswap64:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: bswapq %rdi # sched: [1:1.00]
|
|
; ZNVER1-NEXT: movq %rdi, %rax # sched: [1:0.25]
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
%1 = tail call i64 asm "bswap $0", "=r,0"(i64 %a0) nounwind
|
|
ret i64 %1
|
|
}
|
|
|
|
; TODO - test_bt
|
|
; TODO - test_btc
|
|
; TODO - test_btr
|
|
; TODO - test_bts
|
|
|
|
; TODO - test_call
|
|
|
|
define void @test_cbw_cdq_cdqe_cqo_cwd_cwde() optsize {
|
|
; GENERIC-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: cbtw # sched: [1:0.33]
|
|
; GENERIC-NEXT: cltd # sched: [1:0.50]
|
|
; GENERIC-NEXT: cltq # sched: [1:0.50]
|
|
; GENERIC-NEXT: cqto # sched: [1:0.50]
|
|
; GENERIC-NEXT: cwtd # sched: [2:1.00]
|
|
; GENERIC-NEXT: cwtl # sched: [1:0.33]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: cbtw # sched: [4:2.00]
|
|
; ATOM-NEXT: cltd # sched: [4:2.00]
|
|
; ATOM-NEXT: cltq # sched: [4:2.00]
|
|
; ATOM-NEXT: cqto # sched: [4:2.00]
|
|
; ATOM-NEXT: cwtd # sched: [4:2.00]
|
|
; ATOM-NEXT: cwtl # sched: [4:2.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: cbtw # sched: [1:0.50]
|
|
; SLM-NEXT: cltd # sched: [1:0.50]
|
|
; SLM-NEXT: cltq # sched: [1:0.50]
|
|
; SLM-NEXT: cqto # sched: [1:0.50]
|
|
; SLM-NEXT: cwtd # sched: [1:0.50]
|
|
; SLM-NEXT: cwtl # sched: [1:0.50]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: cbtw # sched: [1:0.33]
|
|
; SANDY-NEXT: cltd # sched: [1:0.50]
|
|
; SANDY-NEXT: cltq # sched: [1:0.50]
|
|
; SANDY-NEXT: cqto # sched: [1:0.50]
|
|
; SANDY-NEXT: cwtd # sched: [2:1.00]
|
|
; SANDY-NEXT: cwtl # sched: [1:0.33]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: cbtw # sched: [1:0.25]
|
|
; HASWELL-NEXT: cltd # sched: [1:0.50]
|
|
; HASWELL-NEXT: cltq # sched: [1:0.50]
|
|
; HASWELL-NEXT: cqto # sched: [1:0.50]
|
|
; HASWELL-NEXT: cwtd # sched: [2:0.50]
|
|
; HASWELL-NEXT: cwtl # sched: [1:0.25]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: cbtw # sched: [1:0.25]
|
|
; BROADWELL-NEXT: cltd # sched: [1:0.50]
|
|
; BROADWELL-NEXT: cltq # sched: [1:0.50]
|
|
; BROADWELL-NEXT: cqto # sched: [1:0.50]
|
|
; BROADWELL-NEXT: cwtd # sched: [2:0.50]
|
|
; BROADWELL-NEXT: cwtl # sched: [1:0.25]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: cbtw # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: cltd # sched: [1:0.50]
|
|
; SKYLAKE-NEXT: cltq # sched: [1:0.50]
|
|
; SKYLAKE-NEXT: cqto # sched: [1:0.50]
|
|
; SKYLAKE-NEXT: cwtd # sched: [2:0.50]
|
|
; SKYLAKE-NEXT: cwtl # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: cbtw # sched: [1:0.25]
|
|
; SKX-NEXT: cltd # sched: [1:0.50]
|
|
; SKX-NEXT: cltq # sched: [1:0.50]
|
|
; SKX-NEXT: cqto # sched: [1:0.50]
|
|
; SKX-NEXT: cwtd # sched: [2:0.50]
|
|
; SKX-NEXT: cwtl # sched: [1:0.25]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: cbtw # sched: [1:0.50]
|
|
; BTVER2-NEXT: cltd # sched: [1:0.50]
|
|
; BTVER2-NEXT: cltq # sched: [1:0.50]
|
|
; BTVER2-NEXT: cqto # sched: [1:0.50]
|
|
; BTVER2-NEXT: cwtd # sched: [1:0.50]
|
|
; BTVER2-NEXT: cwtl # sched: [1:0.50]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_cbw_cdq_cdqe_cqo_cwd_cwde:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: cbtw # sched: [1:0.25]
|
|
; ZNVER1-NEXT: cltd # sched: [1:0.25]
|
|
; ZNVER1-NEXT: cltq # sched: [1:0.25]
|
|
; ZNVER1-NEXT: cqto # sched: [1:0.25]
|
|
; ZNVER1-NEXT: cwtd # sched: [1:0.25]
|
|
; ZNVER1-NEXT: cwtl # sched: [1:0.25]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
tail call void asm "cbw \0A\09 cdq \0A\09 cdqe \0A\09 cqo \0A\09 cwd \0A\09 cwde", ""() nounwind
|
|
ret void
|
|
}
|
|
|
|
define void @test_clc_cld_cmc() optsize {
|
|
; GENERIC-LABEL: test_clc_cld_cmc:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: clc # sched: [1:0.33]
|
|
; GENERIC-NEXT: cld # sched: [1:0.33]
|
|
; GENERIC-NEXT: cmc # sched: [1:0.33]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_clc_cld_cmc:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: clc # sched: [1:0.50]
|
|
; ATOM-NEXT: cld # sched: [3:1.50]
|
|
; ATOM-NEXT: cmc # sched: [1:0.50]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_clc_cld_cmc:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: clc # sched: [1:0.50]
|
|
; SLM-NEXT: cld # sched: [1:0.50]
|
|
; SLM-NEXT: cmc # sched: [1:0.50]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_clc_cld_cmc:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: clc # sched: [1:0.33]
|
|
; SANDY-NEXT: cld # sched: [1:0.33]
|
|
; SANDY-NEXT: cmc # sched: [1:0.33]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_clc_cld_cmc:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: clc # sched: [1:0.25]
|
|
; HASWELL-NEXT: cld # sched: [3:1.00]
|
|
; HASWELL-NEXT: cmc # sched: [1:0.25]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_clc_cld_cmc:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: clc # sched: [1:0.25]
|
|
; BROADWELL-NEXT: cld # sched: [3:1.00]
|
|
; BROADWELL-NEXT: cmc # sched: [1:0.25]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_clc_cld_cmc:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: clc # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: cld # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: cmc # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_clc_cld_cmc:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: clc # sched: [1:0.25]
|
|
; SKX-NEXT: cld # sched: [3:1.00]
|
|
; SKX-NEXT: cmc # sched: [1:0.25]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_clc_cld_cmc:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: clc # sched: [1:0.50]
|
|
; BTVER2-NEXT: cld # sched: [1:0.50]
|
|
; BTVER2-NEXT: cmc # sched: [1:0.50]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_clc_cld_cmc:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: clc # sched: [1:0.25]
|
|
; ZNVER1-NEXT: cld # sched: [1:0.25]
|
|
; ZNVER1-NEXT: cmc # sched: [1:0.25]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
tail call void asm "clc \0A\09 cld \0A\09 cmc", ""() nounwind
|
|
ret void
|
|
}
|
|
|
|
; TODO - test_cmovcc
|
|
; TODO - test_cmp
|
|
|
|
; TODO - test_cmps
|
|
; TODO - test_cmpsb
|
|
; TODO - test_cmpsw
|
|
; TODO - test_cmpsd
|
|
; TODO - test_cmpsq
|
|
|
|
; TODO - test_cmpxchg
|
|
; TODO - test_cmpxchg8b
|
|
; TODO - test_cmpxchg16b
|
|
|
|
define void @test_cpuid() optsize {
|
|
; GENERIC-LABEL: test_cpuid:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: cpuid # sched: [100:0.33]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_cpuid:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: cpuid # sched: [121:60.50]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_cpuid:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: cpuid # sched: [100:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_cpuid:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: cpuid # sched: [100:0.33]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_cpuid:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: cpuid # sched: [18:2.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_cpuid:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: cpuid # sched: [18:2.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_cpuid:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: cpuid # sched: [18:2.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_cpuid:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: cpuid # sched: [18:2.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_cpuid:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: cpuid # sched: [100:0.17]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_cpuid:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: cpuid # sched: [100:?]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
tail call void asm "cpuid", ""() nounwind
|
|
ret void
|
|
}
|
|
|
|
; TODO - test_dec
|
|
; TODO - test_div
|
|
|
|
; TODO - test_enter
|
|
|
|
; TODO - test_idiv
|
|
; TODO - test_imul
|
|
|
|
; TODO - test_in
|
|
|
|
; TODO - test_inc
|
|
|
|
; TODO - test_ins
|
|
; TODO - test_insb
|
|
; TODO - test_insw
|
|
; TODO - test_insd
|
|
|
|
; TODO - test_int
|
|
; TODO - test_into
|
|
|
|
define void @test_invlpg_invlpga(i8 *%a0) optsize {
|
|
; GENERIC-LABEL: test_invlpg_invlpga:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: invlpg (%rdi) # sched: [100:0.33]
|
|
; GENERIC-NEXT: invlpga %ecx, %rax # sched: [100:0.33]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_invlpg_invlpga:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: invlpg (%rdi) # sched: [71:35.50]
|
|
; ATOM-NEXT: invlpga %ecx, %rax # sched: [71:35.50]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_invlpg_invlpga:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: invlpg (%rdi) # sched: [100:1.00]
|
|
; SLM-NEXT: invlpga %ecx, %rax # sched: [100:1.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_invlpg_invlpga:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: invlpg (%rdi) # sched: [100:0.33]
|
|
; SANDY-NEXT: invlpga %ecx, %rax # sched: [100:0.33]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_invlpg_invlpga:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: invlpg (%rdi) # sched: [100:0.25]
|
|
; HASWELL-NEXT: invlpga %ecx, %rax # sched: [100:0.25]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_invlpg_invlpga:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: invlpg (%rdi) # sched: [100:0.25]
|
|
; BROADWELL-NEXT: invlpga %ecx, %rax # sched: [100:0.25]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_invlpg_invlpga:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: invlpg (%rdi) # sched: [100:0.25]
|
|
; SKYLAKE-NEXT: invlpga %ecx, %rax # sched: [100:0.25]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_invlpg_invlpga:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: invlpg (%rdi) # sched: [100:0.25]
|
|
; SKX-NEXT: invlpga %ecx, %rax # sched: [100:0.25]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_invlpg_invlpga:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: invlpg (%rdi) # sched: [100:0.17]
|
|
; BTVER2-NEXT: invlpga %ecx, %rax # sched: [100:0.17]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_invlpg_invlpga:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: invlpg (%rdi) # sched: [100:?]
|
|
; ZNVER1-NEXT: invlpga %ecx, %rax # sched: [100:?]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
tail call void asm sideeffect "invlpg $0 \0A\09 invlpga %ecx, %rax", "*m"(i8 *%a0) nounwind
|
|
ret void
|
|
}
|
|
|
|
; TODO - test_jcc
|
|
; TODO - test_jcxz
|
|
; TODO - test_jwcxz
|
|
; TODO - test_jrcxz
|
|
|
|
; TODO - test_jmp
|
|
|
|
define void @test_lahf_sahf() optsize {
|
|
; GENERIC-LABEL: test_lahf_sahf:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: lahf # sched: [1:0.50]
|
|
; GENERIC-NEXT: sahf # sched: [1:0.50]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_lahf_sahf:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: lahf # sched: [1:0.50]
|
|
; ATOM-NEXT: sahf # sched: [1:0.50]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_lahf_sahf:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: lahf # sched: [1:0.50]
|
|
; SLM-NEXT: sahf # sched: [1:0.50]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_lahf_sahf:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: lahf # sched: [1:0.50]
|
|
; SANDY-NEXT: sahf # sched: [1:0.50]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_lahf_sahf:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: lahf # sched: [1:0.25]
|
|
; HASWELL-NEXT: sahf # sched: [1:0.25]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_lahf_sahf:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: lahf # sched: [1:0.25]
|
|
; BROADWELL-NEXT: sahf # sched: [1:0.25]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_lahf_sahf:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: lahf # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: sahf # sched: [1:0.25]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_lahf_sahf:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: lahf # sched: [1:0.25]
|
|
; SKX-NEXT: sahf # sched: [1:0.25]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_lahf_sahf:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: lahf # sched: [1:0.50]
|
|
; BTVER2-NEXT: sahf # sched: [1:0.50]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_lahf_sahf:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: lahf # sched: [100:?]
|
|
; ZNVER1-NEXT: sahf # sched: [2:0.25]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
tail call void asm "lahf \0A\09 sahf", ""() nounwind
|
|
ret void
|
|
}
|
|
|
|
; TODO - test_lds
|
|
; TODO - test_les
|
|
; TODO - test_lfs
|
|
; TODO - test_lgs
|
|
; TODO - test_lss
|
|
|
|
; TODO - test_lea
|
|
|
|
; TODO - test_leave
|
|
|
|
; TODO - test_lods
|
|
; TODO - test_lodsb
|
|
; TODO - test_lodsw
|
|
; TODO - test_lodsd
|
|
; TODO - test_lodsq
|
|
|
|
; TODO - test_loop
|
|
; TODO - test_loope
|
|
; TODO - test_loopne
|
|
; TODO - test_loopnz
|
|
; TODO - test_loopz
|
|
|
|
; TODO - test_mov
|
|
; TODO - test_movnti
|
|
|
|
; TODO - test_movs
|
|
; TODO - test_movsb
|
|
; TODO - test_movsw
|
|
; TODO - test_movsd
|
|
; TODO - test_movsq
|
|
|
|
; TODO - test_movsx
|
|
; TODO - test_movsxd
|
|
; TODO - test_movzx
|
|
|
|
; TODO - test_mul
|
|
; TODO - test_neg
|
|
; TODO - test_nop
|
|
; TODO - test_not
|
|
; TODO - test_or
|
|
|
|
; TODO - test_out
|
|
|
|
; TODO - test_outs
|
|
; TODO - test_outsb
|
|
; TODO - test_outsw
|
|
; TODO - test_outsd
|
|
|
|
; TODO - test_pause
|
|
|
|
; TODO - test_pop
|
|
; TODO - test_popa
|
|
; TODO - test_popf
|
|
; TODO - test_popfd
|
|
; TODO - test_popfq
|
|
|
|
; TODO - test_prefetch
|
|
; TODO - test_prefetchw
|
|
; TODO - test_prefetchX
|
|
|
|
; TODO - test_push
|
|
; TODO - test_pusha
|
|
; TODO - test_pushad
|
|
; TODO - test_pushf
|
|
; TODO - test_pushfd
|
|
; TODO - test_pushfq
|
|
|
|
; TODO - test_rcl
|
|
; TODO - test_rcr
|
|
|
|
; TODO - test_rdfsbase
|
|
; TODO - test_rdgsbase
|
|
|
|
; TODO - test_ret
|
|
|
|
; TODO - test_rol
|
|
; TODO - test_ror
|
|
|
|
; TODO - test_sar
|
|
; TODO - test_shl
|
|
; TODO - test_shr
|
|
|
|
; TODO - test_sbb
|
|
|
|
; TODO - test_scas
|
|
; TODO - test_scasb
|
|
; TODO - test_scasw
|
|
; TODO - test_scasd
|
|
; TODO - test_scasq
|
|
|
|
; TODO - test_setcc
|
|
|
|
define void @test_shld_shrd_16(i16 %a0, i16 %a1, i16 *%a2) optsize {
|
|
; GENERIC-LABEL: test_shld_shrd_16:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: shldw %cl, %si, %di # sched: [4:1.50]
|
|
; GENERIC-NEXT: shrdw %cl, %si, %di # sched: [4:1.50]
|
|
; GENERIC-NEXT: shldw %cl, %si, (%rdx) # sched: [10:1.50]
|
|
; GENERIC-NEXT: shrdw %cl, %si, (%rdx) # sched: [10:1.50]
|
|
; GENERIC-NEXT: shldw $7, %si, %di # sched: [2:0.67]
|
|
; GENERIC-NEXT: shrdw $7, %si, %di # sched: [2:0.67]
|
|
; GENERIC-NEXT: shldw $7, %si, (%rdx) # sched: [8:1.00]
|
|
; GENERIC-NEXT: shrdw $7, %si, (%rdx) # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_shld_shrd_16:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: shldw %cl, %si, %di # sched: [6:3.00]
|
|
; ATOM-NEXT: shrdw %cl, %si, %di # sched: [6:3.00]
|
|
; ATOM-NEXT: shldw %cl, %si, (%rdx) # sched: [6:3.00]
|
|
; ATOM-NEXT: shrdw %cl, %si, (%rdx) # sched: [6:3.00]
|
|
; ATOM-NEXT: shldw $7, %si, %di # sched: [6:3.00]
|
|
; ATOM-NEXT: shrdw $7, %si, %di # sched: [6:3.00]
|
|
; ATOM-NEXT: shldw $7, %si, (%rdx) # sched: [6:3.00]
|
|
; ATOM-NEXT: shrdw $7, %si, (%rdx) # sched: [6:3.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_shld_shrd_16:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: shldw %cl, %si, %di # sched: [1:1.00]
|
|
; SLM-NEXT: shrdw %cl, %si, %di # sched: [1:1.00]
|
|
; SLM-NEXT: shldw %cl, %si, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shrdw %cl, %si, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shldw $7, %si, %di # sched: [1:1.00]
|
|
; SLM-NEXT: shrdw $7, %si, %di # sched: [1:1.00]
|
|
; SLM-NEXT: shldw $7, %si, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shrdw $7, %si, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_shld_shrd_16:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: shldw %cl, %si, %di # sched: [4:1.50]
|
|
; SANDY-NEXT: shrdw %cl, %si, %di # sched: [4:1.50]
|
|
; SANDY-NEXT: shldw %cl, %si, (%rdx) # sched: [10:1.50]
|
|
; SANDY-NEXT: shrdw %cl, %si, (%rdx) # sched: [10:1.50]
|
|
; SANDY-NEXT: shldw $7, %si, %di # sched: [2:0.67]
|
|
; SANDY-NEXT: shrdw $7, %si, %di # sched: [2:0.67]
|
|
; SANDY-NEXT: shldw $7, %si, (%rdx) # sched: [8:1.00]
|
|
; SANDY-NEXT: shrdw $7, %si, (%rdx) # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_shld_shrd_16:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: shldw %cl, %si, %di # sched: [6:1.00]
|
|
; HASWELL-NEXT: shrdw %cl, %si, %di # sched: [6:1.00]
|
|
; HASWELL-NEXT: shldw %cl, %si, (%rdx) # sched: [6:1.00]
|
|
; HASWELL-NEXT: shrdw %cl, %si, (%rdx) # sched: [6:1.00]
|
|
; HASWELL-NEXT: shldw $7, %si, %di # sched: [3:1.00]
|
|
; HASWELL-NEXT: shrdw $7, %si, %di # sched: [3:1.00]
|
|
; HASWELL-NEXT: shldw $7, %si, (%rdx) # sched: [4:1.00]
|
|
; HASWELL-NEXT: shrdw $7, %si, (%rdx) # sched: [4:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_shld_shrd_16:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: shldw %cl, %si, %di # sched: [6:1.00]
|
|
; BROADWELL-NEXT: shrdw %cl, %si, %di # sched: [6:1.00]
|
|
; BROADWELL-NEXT: shldw %cl, %si, (%rdx) # sched: [11:1.00]
|
|
; BROADWELL-NEXT: shrdw %cl, %si, (%rdx) # sched: [11:1.00]
|
|
; BROADWELL-NEXT: shldw $7, %si, %di # sched: [3:1.00]
|
|
; BROADWELL-NEXT: shrdw $7, %si, %di # sched: [3:1.00]
|
|
; BROADWELL-NEXT: shldw $7, %si, (%rdx) # sched: [9:1.00]
|
|
; BROADWELL-NEXT: shrdw $7, %si, (%rdx) # sched: [9:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_shld_shrd_16:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: shldw %cl, %si, %di # sched: [6:1.00]
|
|
; SKYLAKE-NEXT: shrdw %cl, %si, %di # sched: [6:1.00]
|
|
; SKYLAKE-NEXT: shldw %cl, %si, (%rdx) # sched: [11:1.00]
|
|
; SKYLAKE-NEXT: shrdw %cl, %si, (%rdx) # sched: [11:1.00]
|
|
; SKYLAKE-NEXT: shldw $7, %si, %di # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: shrdw $7, %si, %di # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: shldw $7, %si, (%rdx) # sched: [9:1.00]
|
|
; SKYLAKE-NEXT: shrdw $7, %si, (%rdx) # sched: [9:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_shld_shrd_16:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: shldw %cl, %si, %di # sched: [6:1.00]
|
|
; SKX-NEXT: shrdw %cl, %si, %di # sched: [6:1.00]
|
|
; SKX-NEXT: shldw %cl, %si, (%rdx) # sched: [11:1.00]
|
|
; SKX-NEXT: shrdw %cl, %si, (%rdx) # sched: [11:1.00]
|
|
; SKX-NEXT: shldw $7, %si, %di # sched: [3:1.00]
|
|
; SKX-NEXT: shrdw $7, %si, %di # sched: [3:1.00]
|
|
; SKX-NEXT: shldw $7, %si, (%rdx) # sched: [9:1.00]
|
|
; SKX-NEXT: shrdw $7, %si, (%rdx) # sched: [9:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_shld_shrd_16:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: shldw %cl, %si, %di # sched: [4:4.00]
|
|
; BTVER2-NEXT: shrdw %cl, %si, %di # sched: [4:4.00]
|
|
; BTVER2-NEXT: shldw %cl, %si, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shrdw %cl, %si, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shldw $7, %si, %di # sched: [3:3.00]
|
|
; BTVER2-NEXT: shrdw $7, %si, %di # sched: [3:3.00]
|
|
; BTVER2-NEXT: shldw $7, %si, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shrdw $7, %si, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_shld_shrd_16:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: shldw %cl, %si, %di # sched: [100:?]
|
|
; ZNVER1-NEXT: shrdw %cl, %si, %di # sched: [100:?]
|
|
; ZNVER1-NEXT: shldw %cl, %si, (%rdx) # sched: [100:?]
|
|
; ZNVER1-NEXT: shrdw %cl, %si, (%rdx) # sched: [100:?]
|
|
; ZNVER1-NEXT: shldw $7, %si, %di # sched: [1:0.25]
|
|
; ZNVER1-NEXT: shrdw $7, %si, %di # sched: [1:0.25]
|
|
; ZNVER1-NEXT: shldw $7, %si, (%rdx) # sched: [5:0.50]
|
|
; ZNVER1-NEXT: shrdw $7, %si, (%rdx) # sched: [5:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
call void asm sideeffect "shld $1, $0 \0A\09 shrd $1, $0 \0A\09 shld $1, $2 \0A\09 shrd $1, $2 \0A\09 shld $3, $1, $0 \0A\09 shrd $3, $1, $0 \0A\09 shld $3, $1, $2 \0A\09 shrd $3, $1, $2", "r,r,*m,i"(i16 %a0, i16 %a1, i16 *%a2, i8 7)
|
|
ret void
|
|
}
|
|
define void @test_shld_shrd_32(i32 %a0, i32 %a1, i32 *%a2) optsize {
|
|
; GENERIC-LABEL: test_shld_shrd_32:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: shldl %cl, %esi, %edi # sched: [4:1.50]
|
|
; GENERIC-NEXT: shrdl %cl, %esi, %edi # sched: [4:1.50]
|
|
; GENERIC-NEXT: shldl %cl, %esi, (%rdx) # sched: [10:1.50]
|
|
; GENERIC-NEXT: shrdl %cl, %esi, (%rdx) # sched: [10:1.50]
|
|
; GENERIC-NEXT: shldl $7, %esi, %edi # sched: [2:0.67]
|
|
; GENERIC-NEXT: shrdl $7, %esi, %edi # sched: [2:0.67]
|
|
; GENERIC-NEXT: shldl $7, %esi, (%rdx) # sched: [8:1.00]
|
|
; GENERIC-NEXT: shrdl $7, %esi, (%rdx) # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_shld_shrd_32:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: shldl %cl, %esi, %edi # sched: [2:1.00]
|
|
; ATOM-NEXT: shrdl %cl, %esi, %edi # sched: [2:1.00]
|
|
; ATOM-NEXT: shldl %cl, %esi, (%rdx) # sched: [4:2.00]
|
|
; ATOM-NEXT: shrdl %cl, %esi, (%rdx) # sched: [4:2.00]
|
|
; ATOM-NEXT: shldl $7, %esi, %edi # sched: [2:1.00]
|
|
; ATOM-NEXT: shrdl $7, %esi, %edi # sched: [2:1.00]
|
|
; ATOM-NEXT: shldl $7, %esi, (%rdx) # sched: [4:2.00]
|
|
; ATOM-NEXT: shrdl $7, %esi, (%rdx) # sched: [4:2.00]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_shld_shrd_32:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: shldl %cl, %esi, %edi # sched: [1:1.00]
|
|
; SLM-NEXT: shrdl %cl, %esi, %edi # sched: [1:1.00]
|
|
; SLM-NEXT: shldl %cl, %esi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shrdl %cl, %esi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shldl $7, %esi, %edi # sched: [1:1.00]
|
|
; SLM-NEXT: shrdl $7, %esi, %edi # sched: [1:1.00]
|
|
; SLM-NEXT: shldl $7, %esi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shrdl $7, %esi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_shld_shrd_32:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: shldl %cl, %esi, %edi # sched: [4:1.50]
|
|
; SANDY-NEXT: shrdl %cl, %esi, %edi # sched: [4:1.50]
|
|
; SANDY-NEXT: shldl %cl, %esi, (%rdx) # sched: [10:1.50]
|
|
; SANDY-NEXT: shrdl %cl, %esi, (%rdx) # sched: [10:1.50]
|
|
; SANDY-NEXT: shldl $7, %esi, %edi # sched: [2:0.67]
|
|
; SANDY-NEXT: shrdl $7, %esi, %edi # sched: [2:0.67]
|
|
; SANDY-NEXT: shldl $7, %esi, (%rdx) # sched: [8:1.00]
|
|
; SANDY-NEXT: shrdl $7, %esi, (%rdx) # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_shld_shrd_32:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: shldl %cl, %esi, %edi # sched: [6:1.00]
|
|
; HASWELL-NEXT: shrdl %cl, %esi, %edi # sched: [6:1.00]
|
|
; HASWELL-NEXT: shldl %cl, %esi, (%rdx) # sched: [6:1.00]
|
|
; HASWELL-NEXT: shrdl %cl, %esi, (%rdx) # sched: [6:1.00]
|
|
; HASWELL-NEXT: shldl $7, %esi, %edi # sched: [3:1.00]
|
|
; HASWELL-NEXT: shrdl $7, %esi, %edi # sched: [3:1.00]
|
|
; HASWELL-NEXT: shldl $7, %esi, (%rdx) # sched: [4:1.00]
|
|
; HASWELL-NEXT: shrdl $7, %esi, (%rdx) # sched: [4:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_shld_shrd_32:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: shldl %cl, %esi, %edi # sched: [6:1.00]
|
|
; BROADWELL-NEXT: shrdl %cl, %esi, %edi # sched: [6:1.00]
|
|
; BROADWELL-NEXT: shldl %cl, %esi, (%rdx) # sched: [11:1.00]
|
|
; BROADWELL-NEXT: shrdl %cl, %esi, (%rdx) # sched: [11:1.00]
|
|
; BROADWELL-NEXT: shldl $7, %esi, %edi # sched: [3:1.00]
|
|
; BROADWELL-NEXT: shrdl $7, %esi, %edi # sched: [3:1.00]
|
|
; BROADWELL-NEXT: shldl $7, %esi, (%rdx) # sched: [9:1.00]
|
|
; BROADWELL-NEXT: shrdl $7, %esi, (%rdx) # sched: [9:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_shld_shrd_32:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: shldl %cl, %esi, %edi # sched: [6:1.00]
|
|
; SKYLAKE-NEXT: shrdl %cl, %esi, %edi # sched: [6:1.00]
|
|
; SKYLAKE-NEXT: shldl %cl, %esi, (%rdx) # sched: [11:1.00]
|
|
; SKYLAKE-NEXT: shrdl %cl, %esi, (%rdx) # sched: [11:1.00]
|
|
; SKYLAKE-NEXT: shldl $7, %esi, %edi # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: shrdl $7, %esi, %edi # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: shldl $7, %esi, (%rdx) # sched: [9:1.00]
|
|
; SKYLAKE-NEXT: shrdl $7, %esi, (%rdx) # sched: [9:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_shld_shrd_32:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: shldl %cl, %esi, %edi # sched: [6:1.00]
|
|
; SKX-NEXT: shrdl %cl, %esi, %edi # sched: [6:1.00]
|
|
; SKX-NEXT: shldl %cl, %esi, (%rdx) # sched: [11:1.00]
|
|
; SKX-NEXT: shrdl %cl, %esi, (%rdx) # sched: [11:1.00]
|
|
; SKX-NEXT: shldl $7, %esi, %edi # sched: [3:1.00]
|
|
; SKX-NEXT: shrdl $7, %esi, %edi # sched: [3:1.00]
|
|
; SKX-NEXT: shldl $7, %esi, (%rdx) # sched: [9:1.00]
|
|
; SKX-NEXT: shrdl $7, %esi, (%rdx) # sched: [9:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_shld_shrd_32:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: shldl %cl, %esi, %edi # sched: [4:4.00]
|
|
; BTVER2-NEXT: shrdl %cl, %esi, %edi # sched: [4:4.00]
|
|
; BTVER2-NEXT: shldl %cl, %esi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shrdl %cl, %esi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shldl $7, %esi, %edi # sched: [3:3.00]
|
|
; BTVER2-NEXT: shrdl $7, %esi, %edi # sched: [3:3.00]
|
|
; BTVER2-NEXT: shldl $7, %esi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shrdl $7, %esi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_shld_shrd_32:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: shldl %cl, %esi, %edi # sched: [100:?]
|
|
; ZNVER1-NEXT: shrdl %cl, %esi, %edi # sched: [100:?]
|
|
; ZNVER1-NEXT: shldl %cl, %esi, (%rdx) # sched: [100:?]
|
|
; ZNVER1-NEXT: shrdl %cl, %esi, (%rdx) # sched: [100:?]
|
|
; ZNVER1-NEXT: shldl $7, %esi, %edi # sched: [1:0.25]
|
|
; ZNVER1-NEXT: shrdl $7, %esi, %edi # sched: [1:0.25]
|
|
; ZNVER1-NEXT: shldl $7, %esi, (%rdx) # sched: [5:0.50]
|
|
; ZNVER1-NEXT: shrdl $7, %esi, (%rdx) # sched: [5:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
call void asm sideeffect "shld $1, $0 \0A\09 shrd $1, $0 \0A\09 shld $1, $2 \0A\09 shrd $1, $2 \0A\09 shld $3, $1, $0 \0A\09 shrd $3, $1, $0 \0A\09 shld $3, $1, $2 \0A\09 shrd $3, $1, $2", "r,r,*m,i"(i32 %a0, i32 %a1, i32 *%a2, i8 7)
|
|
ret void
|
|
}
|
|
define void @test_shld_shrd_64(i64 %a0, i64 %a1, i64 *%a2) optsize {
|
|
; GENERIC-LABEL: test_shld_shrd_64:
|
|
; GENERIC: # %bb.0:
|
|
; GENERIC-NEXT: #APP
|
|
; GENERIC-NEXT: shldq %cl, %rsi, %rdi # sched: [4:1.50]
|
|
; GENERIC-NEXT: shrdq %cl, %rsi, %rdi # sched: [4:1.50]
|
|
; GENERIC-NEXT: shldq %cl, %rsi, (%rdx) # sched: [10:1.50]
|
|
; GENERIC-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [10:1.50]
|
|
; GENERIC-NEXT: shldq $7, %rsi, %rdi # sched: [2:0.67]
|
|
; GENERIC-NEXT: shrdq $7, %rsi, %rdi # sched: [2:0.67]
|
|
; GENERIC-NEXT: shldq $7, %rsi, (%rdx) # sched: [8:1.00]
|
|
; GENERIC-NEXT: shrdq $7, %rsi, (%rdx) # sched: [8:1.00]
|
|
; GENERIC-NEXT: #NO_APP
|
|
; GENERIC-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; ATOM-LABEL: test_shld_shrd_64:
|
|
; ATOM: # %bb.0:
|
|
; ATOM-NEXT: #APP
|
|
; ATOM-NEXT: shldq %cl, %rsi, %rdi # sched: [8:4.00]
|
|
; ATOM-NEXT: shrdq %cl, %rsi, %rdi # sched: [8:4.00]
|
|
; ATOM-NEXT: shldq %cl, %rsi, (%rdx) # sched: [9:4.50]
|
|
; ATOM-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [9:4.50]
|
|
; ATOM-NEXT: shldq $7, %rsi, %rdi # sched: [9:4.50]
|
|
; ATOM-NEXT: shrdq $7, %rsi, %rdi # sched: [9:4.50]
|
|
; ATOM-NEXT: shldq $7, %rsi, (%rdx) # sched: [9:4.50]
|
|
; ATOM-NEXT: shrdq $7, %rsi, (%rdx) # sched: [9:4.50]
|
|
; ATOM-NEXT: #NO_APP
|
|
; ATOM-NEXT: retq # sched: [79:39.50]
|
|
;
|
|
; SLM-LABEL: test_shld_shrd_64:
|
|
; SLM: # %bb.0:
|
|
; SLM-NEXT: #APP
|
|
; SLM-NEXT: shldq %cl, %rsi, %rdi # sched: [1:1.00]
|
|
; SLM-NEXT: shrdq %cl, %rsi, %rdi # sched: [1:1.00]
|
|
; SLM-NEXT: shldq %cl, %rsi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shldq $7, %rsi, %rdi # sched: [1:1.00]
|
|
; SLM-NEXT: shrdq $7, %rsi, %rdi # sched: [1:1.00]
|
|
; SLM-NEXT: shldq $7, %rsi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: shrdq $7, %rsi, (%rdx) # sched: [4:2.00]
|
|
; SLM-NEXT: #NO_APP
|
|
; SLM-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; SANDY-LABEL: test_shld_shrd_64:
|
|
; SANDY: # %bb.0:
|
|
; SANDY-NEXT: #APP
|
|
; SANDY-NEXT: shldq %cl, %rsi, %rdi # sched: [4:1.50]
|
|
; SANDY-NEXT: shrdq %cl, %rsi, %rdi # sched: [4:1.50]
|
|
; SANDY-NEXT: shldq %cl, %rsi, (%rdx) # sched: [10:1.50]
|
|
; SANDY-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [10:1.50]
|
|
; SANDY-NEXT: shldq $7, %rsi, %rdi # sched: [2:0.67]
|
|
; SANDY-NEXT: shrdq $7, %rsi, %rdi # sched: [2:0.67]
|
|
; SANDY-NEXT: shldq $7, %rsi, (%rdx) # sched: [8:1.00]
|
|
; SANDY-NEXT: shrdq $7, %rsi, (%rdx) # sched: [8:1.00]
|
|
; SANDY-NEXT: #NO_APP
|
|
; SANDY-NEXT: retq # sched: [1:1.00]
|
|
;
|
|
; HASWELL-LABEL: test_shld_shrd_64:
|
|
; HASWELL: # %bb.0:
|
|
; HASWELL-NEXT: #APP
|
|
; HASWELL-NEXT: shldq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; HASWELL-NEXT: shrdq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; HASWELL-NEXT: shldq %cl, %rsi, (%rdx) # sched: [6:1.00]
|
|
; HASWELL-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [6:1.00]
|
|
; HASWELL-NEXT: shldq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; HASWELL-NEXT: shrdq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; HASWELL-NEXT: shldq $7, %rsi, (%rdx) # sched: [4:1.00]
|
|
; HASWELL-NEXT: shrdq $7, %rsi, (%rdx) # sched: [4:1.00]
|
|
; HASWELL-NEXT: #NO_APP
|
|
; HASWELL-NEXT: retq # sched: [2:1.00]
|
|
;
|
|
; BROADWELL-LABEL: test_shld_shrd_64:
|
|
; BROADWELL: # %bb.0:
|
|
; BROADWELL-NEXT: #APP
|
|
; BROADWELL-NEXT: shldq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; BROADWELL-NEXT: shrdq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; BROADWELL-NEXT: shldq %cl, %rsi, (%rdx) # sched: [11:1.00]
|
|
; BROADWELL-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [11:1.00]
|
|
; BROADWELL-NEXT: shldq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; BROADWELL-NEXT: shrdq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; BROADWELL-NEXT: shldq $7, %rsi, (%rdx) # sched: [9:1.00]
|
|
; BROADWELL-NEXT: shrdq $7, %rsi, (%rdx) # sched: [9:1.00]
|
|
; BROADWELL-NEXT: #NO_APP
|
|
; BROADWELL-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKYLAKE-LABEL: test_shld_shrd_64:
|
|
; SKYLAKE: # %bb.0:
|
|
; SKYLAKE-NEXT: #APP
|
|
; SKYLAKE-NEXT: shldq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; SKYLAKE-NEXT: shrdq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; SKYLAKE-NEXT: shldq %cl, %rsi, (%rdx) # sched: [11:1.00]
|
|
; SKYLAKE-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [11:1.00]
|
|
; SKYLAKE-NEXT: shldq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: shrdq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; SKYLAKE-NEXT: shldq $7, %rsi, (%rdx) # sched: [9:1.00]
|
|
; SKYLAKE-NEXT: shrdq $7, %rsi, (%rdx) # sched: [9:1.00]
|
|
; SKYLAKE-NEXT: #NO_APP
|
|
; SKYLAKE-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; SKX-LABEL: test_shld_shrd_64:
|
|
; SKX: # %bb.0:
|
|
; SKX-NEXT: #APP
|
|
; SKX-NEXT: shldq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; SKX-NEXT: shrdq %cl, %rsi, %rdi # sched: [6:1.00]
|
|
; SKX-NEXT: shldq %cl, %rsi, (%rdx) # sched: [11:1.00]
|
|
; SKX-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [11:1.00]
|
|
; SKX-NEXT: shldq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; SKX-NEXT: shrdq $7, %rsi, %rdi # sched: [3:1.00]
|
|
; SKX-NEXT: shldq $7, %rsi, (%rdx) # sched: [9:1.00]
|
|
; SKX-NEXT: shrdq $7, %rsi, (%rdx) # sched: [9:1.00]
|
|
; SKX-NEXT: #NO_APP
|
|
; SKX-NEXT: retq # sched: [7:1.00]
|
|
;
|
|
; BTVER2-LABEL: test_shld_shrd_64:
|
|
; BTVER2: # %bb.0:
|
|
; BTVER2-NEXT: #APP
|
|
; BTVER2-NEXT: shldq %cl, %rsi, %rdi # sched: [4:4.00]
|
|
; BTVER2-NEXT: shrdq %cl, %rsi, %rdi # sched: [4:4.00]
|
|
; BTVER2-NEXT: shldq %cl, %rsi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shldq $7, %rsi, %rdi # sched: [3:3.00]
|
|
; BTVER2-NEXT: shrdq $7, %rsi, %rdi # sched: [3:3.00]
|
|
; BTVER2-NEXT: shldq $7, %rsi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: shrdq $7, %rsi, (%rdx) # sched: [9:11.00]
|
|
; BTVER2-NEXT: #NO_APP
|
|
; BTVER2-NEXT: retq # sched: [4:1.00]
|
|
;
|
|
; ZNVER1-LABEL: test_shld_shrd_64:
|
|
; ZNVER1: # %bb.0:
|
|
; ZNVER1-NEXT: #APP
|
|
; ZNVER1-NEXT: shldq %cl, %rsi, %rdi # sched: [100:?]
|
|
; ZNVER1-NEXT: shrdq %cl, %rsi, %rdi # sched: [100:?]
|
|
; ZNVER1-NEXT: shldq %cl, %rsi, (%rdx) # sched: [100:?]
|
|
; ZNVER1-NEXT: shrdq %cl, %rsi, (%rdx) # sched: [100:?]
|
|
; ZNVER1-NEXT: shldq $7, %rsi, %rdi # sched: [1:0.25]
|
|
; ZNVER1-NEXT: shrdq $7, %rsi, %rdi # sched: [1:0.25]
|
|
; ZNVER1-NEXT: shldq $7, %rsi, (%rdx) # sched: [5:0.50]
|
|
; ZNVER1-NEXT: shrdq $7, %rsi, (%rdx) # sched: [5:0.50]
|
|
; ZNVER1-NEXT: #NO_APP
|
|
; ZNVER1-NEXT: retq # sched: [1:0.50]
|
|
call void asm sideeffect "shld $1, $0 \0A\09 shrd $1, $0 \0A\09 shld $1, $2 \0A\09 shrd $1, $2 \0A\09 shld $3, $1, $0 \0A\09 shrd $3, $1, $0 \0A\09 shld $3, $1, $2 \0A\09 shrd $3, $1, $2", "r,r,*m,i"(i64 %a0, i64 %a1, i64 *%a2, i8 7)
|
|
ret void
|
|
}
|
|
|
|
; TODO - test_stc
|
|
; TODO - test_std
|
|
|
|
; TODO - test_stos
|
|
; TODO - test_stosb
|
|
; TODO - test_stosw
|
|
; TODO - test_stosd
|
|
; TODO - test_stosq
|
|
|
|
; TODO - test_sub
|
|
; TODO - test_test
|
|
|
|
; TODO - test_wrfsbase
|
|
; TODO - test_wrgsbase
|
|
|
|
; TODO - test_xadd
|
|
; TODO - test_xchg
|
|
; TODO - test_xlat
|
|
; TODO - test_xlatb
|
|
|
|
; TODO - test_xor
|