blob: c2772cc23183c80d9a76570fb4124f80e9bd11e7 [file] [log] [blame]
; 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=bdver2 | FileCheck %s --check-prefix=CHECK --check-prefix=BDVER2
; 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
define void @test_adc_8(i8 %a0, i8* %a1, i8 %a2) optsize {
; GENERIC-LABEL: test_adc_8:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: adcb $7, %al # sched: [2:0.67]
; GENERIC-NEXT: adcb $7, %dil # sched: [2:0.67]
; GENERIC-NEXT: adcb $7, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcb %dl, %dil # sched: [2:0.67]
; GENERIC-NEXT: adcb %dil, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcb (%rsi), %dil # sched: [7:0.67]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_adc_8:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: adcb $7, %al # sched: [1:0.50]
; ATOM-NEXT: adcb $7, %dil # sched: [1:0.50]
; ATOM-NEXT: adcb $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcb %dl, %dil # sched: [1:0.50]
; ATOM-NEXT: adcb %dil, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcb (%rsi), %dil # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_adc_8:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: adcb $7, %al # sched: [1:0.50]
; SLM-NEXT: adcb $7, %dil # sched: [1:0.50]
; SLM-NEXT: adcb $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcb %dl, %dil # sched: [1:0.50]
; SLM-NEXT: adcb %dil, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcb (%rsi), %dil # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_adc_8:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: adcb $7, %al # sched: [2:0.67]
; SANDY-NEXT: adcb $7, %dil # sched: [2:0.67]
; SANDY-NEXT: adcb $7, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcb %dl, %dil # sched: [2:0.67]
; SANDY-NEXT: adcb %dil, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcb (%rsi), %dil # sched: [7:0.67]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_adc_8:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: adcb $7, %al # sched: [2:0.50]
; HASWELL-NEXT: adcb $7, %dil # sched: [2:0.50]
; HASWELL-NEXT: adcb $7, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcb %dl, %dil # sched: [2:0.50]
; HASWELL-NEXT: adcb %dil, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcb (%rsi), %dil # sched: [7:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_adc_8:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: adcb $7, %al # sched: [2:0.50]
; BROADWELL-NEXT: adcb $7, %dil # sched: [2:0.50]
; BROADWELL-NEXT: adcb $7, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcb %dl, %dil # sched: [1:0.50]
; BROADWELL-NEXT: adcb %dil, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcb (%rsi), %dil # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_adc_8:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: adcb $7, %al # sched: [2:0.50]
; SKYLAKE-NEXT: adcb $7, %dil # sched: [2:0.50]
; SKYLAKE-NEXT: adcb $7, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcb %dl, %dil # sched: [1:0.50]
; SKYLAKE-NEXT: adcb %dil, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcb (%rsi), %dil # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_adc_8:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: adcb $7, %al # sched: [2:0.50]
; SKX-NEXT: adcb $7, %dil # sched: [2:0.50]
; SKX-NEXT: adcb $7, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcb %dl, %dil # sched: [1:0.50]
; SKX-NEXT: adcb %dil, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcb (%rsi), %dil # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_adc_8:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: adcb $7, %al # sched: [1:1.00]
; BDVER2-NEXT: adcb $7, %dil # sched: [1:1.00]
; BDVER2-NEXT: adcb $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcb %dl, %dil # sched: [1:1.00]
; BDVER2-NEXT: adcb %dil, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcb (%rsi), %dil # sched: [5:1.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_adc_8:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: adcb $7, %al # sched: [1:1.00]
; BTVER2-NEXT: adcb $7, %dil # sched: [1:1.00]
; BTVER2-NEXT: adcb $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcb %dl, %dil # sched: [1:1.00]
; BTVER2-NEXT: adcb %dil, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcb (%rsi), %dil # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_adc_8:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: adcb $7, %al # sched: [1:0.25]
; ZNVER1-NEXT: adcb $7, %dil # sched: [1:0.25]
; ZNVER1-NEXT: adcb $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcb %dl, %dil # sched: [1:0.25]
; ZNVER1-NEXT: adcb %dil, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcb (%rsi), %dil # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "adcb $3, %AL \0A\09 adcb $3, $0 \0A\09 adcb $3, $2 \0A\09 adcb $1, $0 \0A\09 adcb $0, $2 \0A\09 adcb $2, $0", "r,r,*m,i"(i8 %a0, i8 %a2, i8* %a1, i8 7) nounwind
ret void
}
define void @test_adc_16(i16 %a0, i16* %a1, i16 %a2) optsize {
; GENERIC-LABEL: test_adc_16:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: adcw $511, %ax # imm = 0x1FF
; GENERIC-NEXT: # sched: [2:0.67]
; GENERIC-NEXT: adcw $511, %di # imm = 0x1FF
; GENERIC-NEXT: # sched: [2:0.67]
; GENERIC-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; GENERIC-NEXT: # sched: [9:1.00]
; GENERIC-NEXT: adcw $7, %di # sched: [2:0.67]
; GENERIC-NEXT: adcw $7, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcw %dx, %di # sched: [2:0.67]
; GENERIC-NEXT: adcw %di, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcw (%rsi), %di # sched: [7:0.67]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_adc_16:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: adcw $511, %ax # imm = 0x1FF
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: adcw $511, %di # imm = 0x1FF
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: adcw $7, %di # sched: [1:0.50]
; ATOM-NEXT: adcw $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcw %dx, %di # sched: [1:0.50]
; ATOM-NEXT: adcw %di, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcw (%rsi), %di # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_adc_16:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: adcw $511, %ax # imm = 0x1FF
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: adcw $511, %di # imm = 0x1FF
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: adcw $7, %di # sched: [1:0.50]
; SLM-NEXT: adcw $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcw %dx, %di # sched: [1:0.50]
; SLM-NEXT: adcw %di, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcw (%rsi), %di # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_adc_16:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: adcw $511, %ax # imm = 0x1FF
; SANDY-NEXT: # sched: [2:0.67]
; SANDY-NEXT: adcw $511, %di # imm = 0x1FF
; SANDY-NEXT: # sched: [2:0.67]
; SANDY-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; SANDY-NEXT: # sched: [9:1.00]
; SANDY-NEXT: adcw $7, %di # sched: [2:0.67]
; SANDY-NEXT: adcw $7, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcw %dx, %di # sched: [2:0.67]
; SANDY-NEXT: adcw %di, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcw (%rsi), %di # sched: [7:0.67]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_adc_16:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: adcw $511, %ax # imm = 0x1FF
; HASWELL-NEXT: # sched: [2:0.50]
; HASWELL-NEXT: adcw $511, %di # imm = 0x1FF
; HASWELL-NEXT: # sched: [2:0.50]
; HASWELL-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; HASWELL-NEXT: # sched: [9:1.00]
; HASWELL-NEXT: adcw $7, %di # sched: [2:0.50]
; HASWELL-NEXT: adcw $7, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcw %dx, %di # sched: [2:0.50]
; HASWELL-NEXT: adcw %di, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcw (%rsi), %di # sched: [7:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_adc_16:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: adcw $511, %ax # imm = 0x1FF
; BROADWELL-NEXT: # sched: [1:0.50]
; BROADWELL-NEXT: adcw $511, %di # imm = 0x1FF
; BROADWELL-NEXT: # sched: [1:0.50]
; BROADWELL-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; BROADWELL-NEXT: # sched: [8:1.00]
; BROADWELL-NEXT: adcw $7, %di # sched: [1:0.50]
; BROADWELL-NEXT: adcw $7, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcw %dx, %di # sched: [1:0.50]
; BROADWELL-NEXT: adcw %di, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcw (%rsi), %di # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_adc_16:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: adcw $511, %ax # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [1:0.50]
; SKYLAKE-NEXT: adcw $511, %di # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [1:0.50]
; SKYLAKE-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [8:1.00]
; SKYLAKE-NEXT: adcw $7, %di # sched: [1:0.50]
; SKYLAKE-NEXT: adcw $7, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcw %dx, %di # sched: [1:0.50]
; SKYLAKE-NEXT: adcw %di, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcw (%rsi), %di # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_adc_16:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: adcw $511, %ax # imm = 0x1FF
; SKX-NEXT: # sched: [1:0.50]
; SKX-NEXT: adcw $511, %di # imm = 0x1FF
; SKX-NEXT: # sched: [1:0.50]
; SKX-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; SKX-NEXT: # sched: [8:1.00]
; SKX-NEXT: adcw $7, %di # sched: [1:0.50]
; SKX-NEXT: adcw $7, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcw %dx, %di # sched: [1:0.50]
; SKX-NEXT: adcw %di, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcw (%rsi), %di # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_adc_16:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: adcw $511, %ax # imm = 0x1FF
; BDVER2-NEXT: # sched: [1:1.00]
; BDVER2-NEXT: adcw $511, %di # imm = 0x1FF
; BDVER2-NEXT: # sched: [1:1.00]
; BDVER2-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: adcw $7, %di # sched: [1:1.00]
; BDVER2-NEXT: adcw $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcw %dx, %di # sched: [1:1.00]
; BDVER2-NEXT: adcw %di, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcw (%rsi), %di # sched: [5:1.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_adc_16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: adcw $511, %ax # imm = 0x1FF
; BTVER2-NEXT: # sched: [1:1.00]
; BTVER2-NEXT: adcw $511, %di # imm = 0x1FF
; BTVER2-NEXT: # sched: [1:1.00]
; BTVER2-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: adcw $7, %di # sched: [1:1.00]
; BTVER2-NEXT: adcw $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcw %dx, %di # sched: [1:1.00]
; BTVER2-NEXT: adcw %di, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcw (%rsi), %di # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_adc_16:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: adcw $511, %ax # imm = 0x1FF
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: adcw $511, %di # imm = 0x1FF
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: adcw $511, (%rsi) # imm = 0x1FF
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: adcw $7, %di # sched: [1:0.25]
; ZNVER1-NEXT: adcw $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcw %dx, %di # sched: [1:0.25]
; ZNVER1-NEXT: adcw %di, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcw (%rsi), %di # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "adcw $3, %AX \0A\09 adcw $3, $0 \0A\09 adcw $3, $2 \0A\09 adcw $4, $0 \0A\09 adcw $4, $2 \0A\09 adcw $1, $0 \0A\09 adcw $0, $2 \0A\09 adcw $2, $0", "r,r,*m,i,i"(i16 %a0, i16 %a2, i16* %a1, i16 511, i8 7) nounwind
ret void
}
define void @test_adc_32(i32 %a0, i32* %a1, i32 %a2) optsize {
; GENERIC-LABEL: test_adc_32:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: adcl $665536, %eax # imm = 0xA27C0
; GENERIC-NEXT: # sched: [2:0.67]
; GENERIC-NEXT: adcl $665536, %edi # imm = 0xA27C0
; GENERIC-NEXT: # sched: [2:0.67]
; GENERIC-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; GENERIC-NEXT: # sched: [9:1.00]
; GENERIC-NEXT: adcl $7, %edi # sched: [2:0.67]
; GENERIC-NEXT: adcl $7, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcl %edx, %edi # sched: [2:0.67]
; GENERIC-NEXT: adcl %edi, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcl (%rsi), %edi # sched: [7:0.67]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_adc_32:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: adcl $665536, %eax # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: adcl $665536, %edi # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: adcl $7, %edi # sched: [1:0.50]
; ATOM-NEXT: adcl $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcl %edx, %edi # sched: [1:0.50]
; ATOM-NEXT: adcl %edi, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcl (%rsi), %edi # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_adc_32:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: adcl $665536, %eax # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: adcl $665536, %edi # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: adcl $7, %edi # sched: [1:0.50]
; SLM-NEXT: adcl $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcl %edx, %edi # sched: [1:0.50]
; SLM-NEXT: adcl %edi, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcl (%rsi), %edi # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_adc_32:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: adcl $665536, %eax # imm = 0xA27C0
; SANDY-NEXT: # sched: [2:0.67]
; SANDY-NEXT: adcl $665536, %edi # imm = 0xA27C0
; SANDY-NEXT: # sched: [2:0.67]
; SANDY-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; SANDY-NEXT: # sched: [9:1.00]
; SANDY-NEXT: adcl $7, %edi # sched: [2:0.67]
; SANDY-NEXT: adcl $7, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcl %edx, %edi # sched: [2:0.67]
; SANDY-NEXT: adcl %edi, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcl (%rsi), %edi # sched: [7:0.67]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_adc_32:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: adcl $665536, %eax # imm = 0xA27C0
; HASWELL-NEXT: # sched: [2:0.50]
; HASWELL-NEXT: adcl $665536, %edi # imm = 0xA27C0
; HASWELL-NEXT: # sched: [2:0.50]
; HASWELL-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; HASWELL-NEXT: # sched: [9:1.00]
; HASWELL-NEXT: adcl $7, %edi # sched: [2:0.50]
; HASWELL-NEXT: adcl $7, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcl %edx, %edi # sched: [2:0.50]
; HASWELL-NEXT: adcl %edi, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcl (%rsi), %edi # sched: [7:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_adc_32:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: adcl $665536, %eax # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.50]
; BROADWELL-NEXT: adcl $665536, %edi # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.50]
; BROADWELL-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [8:1.00]
; BROADWELL-NEXT: adcl $7, %edi # sched: [1:0.50]
; BROADWELL-NEXT: adcl $7, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcl %edx, %edi # sched: [1:0.50]
; BROADWELL-NEXT: adcl %edi, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcl (%rsi), %edi # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_adc_32:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: adcl $665536, %eax # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.50]
; SKYLAKE-NEXT: adcl $665536, %edi # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.50]
; SKYLAKE-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [8:1.00]
; SKYLAKE-NEXT: adcl $7, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: adcl $7, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcl %edx, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: adcl %edi, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcl (%rsi), %edi # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_adc_32:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: adcl $665536, %eax # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.50]
; SKX-NEXT: adcl $665536, %edi # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.50]
; SKX-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; SKX-NEXT: # sched: [8:1.00]
; SKX-NEXT: adcl $7, %edi # sched: [1:0.50]
; SKX-NEXT: adcl $7, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcl %edx, %edi # sched: [1:0.50]
; SKX-NEXT: adcl %edi, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcl (%rsi), %edi # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_adc_32:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: adcl $665536, %eax # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:1.00]
; BDVER2-NEXT: adcl $665536, %edi # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:1.00]
; BDVER2-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: adcl $7, %edi # sched: [1:1.00]
; BDVER2-NEXT: adcl $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcl %edx, %edi # sched: [1:1.00]
; BDVER2-NEXT: adcl %edi, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcl (%rsi), %edi # sched: [5:1.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_adc_32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: adcl $665536, %eax # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:1.00]
; BTVER2-NEXT: adcl $665536, %edi # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:1.00]
; BTVER2-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: adcl $7, %edi # sched: [1:1.00]
; BTVER2-NEXT: adcl $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcl %edx, %edi # sched: [1:1.00]
; BTVER2-NEXT: adcl %edi, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcl (%rsi), %edi # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_adc_32:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: adcl $665536, %eax # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: adcl $665536, %edi # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: adcl $665536, (%rsi) # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: adcl $7, %edi # sched: [1:0.25]
; ZNVER1-NEXT: adcl $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcl %edx, %edi # sched: [1:0.25]
; ZNVER1-NEXT: adcl %edi, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcl (%rsi), %edi # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "adcl $3, %EAX \0A\09 adcl $3, $0 \0A\09 adcl $3, $2 \0A\09 adcl $4, $0 \0A\09 adcl $4, $2 \0A\09 adcl $1, $0 \0A\09 adcl $0, $2 \0A\09 adcl $2, $0", "r,r,*m,i,i"(i32 %a0, i32 %a2, i32* %a1, i32 665536, i8 7) nounwind
ret void
}
define void @test_adc_64(i64 %a0, i64* %a1, i64 %a2) optsize {
; GENERIC-LABEL: test_adc_64:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: adcq $665536, %rax # imm = 0xA27C0
; GENERIC-NEXT: # sched: [2:0.67]
; GENERIC-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; GENERIC-NEXT: # sched: [2:0.67]
; GENERIC-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; GENERIC-NEXT: # sched: [9:1.00]
; GENERIC-NEXT: adcq $7, %rdi # sched: [2:0.67]
; GENERIC-NEXT: adcq $7, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcq %rdx, %rdi # sched: [2:0.67]
; GENERIC-NEXT: adcq %rdi, (%rsi) # sched: [9:1.00]
; GENERIC-NEXT: adcq (%rsi), %rdi # sched: [7:0.67]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_adc_64:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: adcq $665536, %rax # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: adcq $7, %rdi # sched: [1:0.50]
; ATOM-NEXT: adcq $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcq %rdx, %rdi # sched: [1:0.50]
; ATOM-NEXT: adcq %rdi, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: adcq (%rsi), %rdi # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_adc_64:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: adcq $665536, %rax # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: adcq $7, %rdi # sched: [1:0.50]
; SLM-NEXT: adcq $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcq %rdx, %rdi # sched: [1:0.50]
; SLM-NEXT: adcq %rdi, (%rsi) # sched: [5:2.00]
; SLM-NEXT: adcq (%rsi), %rdi # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_adc_64:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: adcq $665536, %rax # imm = 0xA27C0
; SANDY-NEXT: # sched: [2:0.67]
; SANDY-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; SANDY-NEXT: # sched: [2:0.67]
; SANDY-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; SANDY-NEXT: # sched: [9:1.00]
; SANDY-NEXT: adcq $7, %rdi # sched: [2:0.67]
; SANDY-NEXT: adcq $7, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcq %rdx, %rdi # sched: [2:0.67]
; SANDY-NEXT: adcq %rdi, (%rsi) # sched: [9:1.00]
; SANDY-NEXT: adcq (%rsi), %rdi # sched: [7:0.67]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_adc_64:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: adcq $665536, %rax # imm = 0xA27C0
; HASWELL-NEXT: # sched: [2:0.50]
; HASWELL-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; HASWELL-NEXT: # sched: [2:0.50]
; HASWELL-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; HASWELL-NEXT: # sched: [9:1.00]
; HASWELL-NEXT: adcq $7, %rdi # sched: [2:0.50]
; HASWELL-NEXT: adcq $7, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcq %rdx, %rdi # sched: [2:0.50]
; HASWELL-NEXT: adcq %rdi, (%rsi) # sched: [9:1.00]
; HASWELL-NEXT: adcq (%rsi), %rdi # sched: [7:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_adc_64:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: adcq $665536, %rax # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.50]
; BROADWELL-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.50]
; BROADWELL-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [8:1.00]
; BROADWELL-NEXT: adcq $7, %rdi # sched: [1:0.50]
; BROADWELL-NEXT: adcq $7, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcq %rdx, %rdi # sched: [1:0.50]
; BROADWELL-NEXT: adcq %rdi, (%rsi) # sched: [8:1.00]
; BROADWELL-NEXT: adcq (%rsi), %rdi # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_adc_64:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: adcq $665536, %rax # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.50]
; SKYLAKE-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.50]
; SKYLAKE-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [8:1.00]
; SKYLAKE-NEXT: adcq $7, %rdi # sched: [1:0.50]
; SKYLAKE-NEXT: adcq $7, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcq %rdx, %rdi # sched: [1:0.50]
; SKYLAKE-NEXT: adcq %rdi, (%rsi) # sched: [8:1.00]
; SKYLAKE-NEXT: adcq (%rsi), %rdi # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_adc_64:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: adcq $665536, %rax # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.50]
; SKX-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.50]
; SKX-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; SKX-NEXT: # sched: [8:1.00]
; SKX-NEXT: adcq $7, %rdi # sched: [1:0.50]
; SKX-NEXT: adcq $7, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcq %rdx, %rdi # sched: [1:0.50]
; SKX-NEXT: adcq %rdi, (%rsi) # sched: [8:1.00]
; SKX-NEXT: adcq (%rsi), %rdi # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_adc_64:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: adcq $665536, %rax # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:1.00]
; BDVER2-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:1.00]
; BDVER2-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: adcq $7, %rdi # sched: [1:1.00]
; BDVER2-NEXT: adcq $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcq %rdx, %rdi # sched: [1:1.00]
; BDVER2-NEXT: adcq %rdi, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: adcq (%rsi), %rdi # sched: [5:1.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_adc_64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: adcq $665536, %rax # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:1.00]
; BTVER2-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:1.00]
; BTVER2-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: adcq $7, %rdi # sched: [1:1.00]
; BTVER2-NEXT: adcq $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcq %rdx, %rdi # sched: [1:1.00]
; BTVER2-NEXT: adcq %rdi, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: adcq (%rsi), %rdi # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_adc_64:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: adcq $665536, %rax # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: adcq $665536, %rdi # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: adcq $665536, (%rsi) # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: adcq $7, %rdi # sched: [1:0.25]
; ZNVER1-NEXT: adcq $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcq %rdx, %rdi # sched: [1:0.25]
; ZNVER1-NEXT: adcq %rdi, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: adcq (%rsi), %rdi # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "adcq $3, %RAX \0A\09 adcq $3, $0 \0A\09 adcq $3, $2 \0A\09 adcq $4, $0 \0A\09 adcq $4, $2 \0A\09 adcq $1, $0 \0A\09 adcq $0, $2 \0A\09 adcq $2, $0", "r,r,*m,i,i"(i64 %a0, i64 %a2, i64* %a1, i32 665536, i8 7) nounwind
ret void
}
define void @test_add_8(i8 %a0, i8* %a1, i8 %a2) optsize {
; GENERIC-LABEL: test_add_8:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: addb $7, %al # sched: [1:0.33]
; GENERIC-NEXT: addb $7, %dil # sched: [1:0.33]
; GENERIC-NEXT: addb $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addb %dl, %dil # sched: [1:0.33]
; GENERIC-NEXT: addb %dil, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addb (%rsi), %dil # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_add_8:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: addb $7, %al # sched: [1:0.50]
; ATOM-NEXT: addb $7, %dil # sched: [1:0.50]
; ATOM-NEXT: addb $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addb %dl, %dil # sched: [1:0.50]
; ATOM-NEXT: addb %dil, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addb (%rsi), %dil # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_add_8:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: addb $7, %al # sched: [1:0.50]
; SLM-NEXT: addb $7, %dil # sched: [1:0.50]
; SLM-NEXT: addb $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addb %dl, %dil # sched: [1:0.50]
; SLM-NEXT: addb %dil, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addb (%rsi), %dil # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_add_8:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: addb $7, %al # sched: [1:0.33]
; SANDY-NEXT: addb $7, %dil # sched: [1:0.33]
; SANDY-NEXT: addb $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addb %dl, %dil # sched: [1:0.33]
; SANDY-NEXT: addb %dil, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addb (%rsi), %dil # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_add_8:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: addb $7, %al # sched: [1:0.25]
; HASWELL-NEXT: addb $7, %dil # sched: [1:0.25]
; HASWELL-NEXT: addb $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addb %dl, %dil # sched: [1:0.25]
; HASWELL-NEXT: addb %dil, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addb (%rsi), %dil # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_add_8:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: addb $7, %al # sched: [1:0.25]
; BROADWELL-NEXT: addb $7, %dil # sched: [1:0.25]
; BROADWELL-NEXT: addb $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addb %dl, %dil # sched: [1:0.25]
; BROADWELL-NEXT: addb %dil, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addb (%rsi), %dil # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_add_8:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: addb $7, %al # sched: [1:0.25]
; SKYLAKE-NEXT: addb $7, %dil # sched: [1:0.25]
; SKYLAKE-NEXT: addb $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addb %dl, %dil # sched: [1:0.25]
; SKYLAKE-NEXT: addb %dil, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addb (%rsi), %dil # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_add_8:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: addb $7, %al # sched: [1:0.25]
; SKX-NEXT: addb $7, %dil # sched: [1:0.25]
; SKX-NEXT: addb $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addb %dl, %dil # sched: [1:0.25]
; SKX-NEXT: addb %dil, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addb (%rsi), %dil # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_add_8:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: addb $7, %al # sched: [1:0.50]
; BDVER2-NEXT: addb $7, %dil # sched: [1:0.50]
; BDVER2-NEXT: addb $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addb %dl, %dil # sched: [1:0.50]
; BDVER2-NEXT: addb %dil, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addb (%rsi), %dil # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_add_8:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: addb $7, %al # sched: [1:0.50]
; BTVER2-NEXT: addb $7, %dil # sched: [1:0.50]
; BTVER2-NEXT: addb $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addb %dl, %dil # sched: [1:0.50]
; BTVER2-NEXT: addb %dil, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addb (%rsi), %dil # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_add_8:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: addb $7, %al # sched: [1:0.25]
; ZNVER1-NEXT: addb $7, %dil # sched: [1:0.25]
; ZNVER1-NEXT: addb $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addb %dl, %dil # sched: [1:0.25]
; ZNVER1-NEXT: addb %dil, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addb (%rsi), %dil # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "addb $3, %AL \0A\09 addb $3, $0 \0A\09 addb $3, $2 \0A\09 addb $1, $0 \0A\09 addb $0, $2 \0A\09 addb $2, $0", "r,r,*m,i"(i8 %a0, i8 %a2, i8* %a1, i8 7) nounwind
ret void
}
define void @test_add_16(i16 %a0, i16* %a1, i16 %a2) optsize {
; GENERIC-LABEL: test_add_16:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: addw $511, %ax # imm = 0x1FF
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: addw $511, %di # imm = 0x1FF
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: addw $511, (%rsi) # imm = 0x1FF
; GENERIC-NEXT: # sched: [7:1.00]
; GENERIC-NEXT: addw $7, %di # sched: [1:0.33]
; GENERIC-NEXT: addw $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addw %dx, %di # sched: [1:0.33]
; GENERIC-NEXT: addw %di, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addw (%rsi), %di # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_add_16:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: addw $511, %ax # imm = 0x1FF
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: addw $511, %di # imm = 0x1FF
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: addw $511, (%rsi) # imm = 0x1FF
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: addw $7, %di # sched: [1:0.50]
; ATOM-NEXT: addw $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addw %dx, %di # sched: [1:0.50]
; ATOM-NEXT: addw %di, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addw (%rsi), %di # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_add_16:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: addw $511, %ax # imm = 0x1FF
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: addw $511, %di # imm = 0x1FF
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: addw $511, (%rsi) # imm = 0x1FF
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: addw $7, %di # sched: [1:0.50]
; SLM-NEXT: addw $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addw %dx, %di # sched: [1:0.50]
; SLM-NEXT: addw %di, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addw (%rsi), %di # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_add_16:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: addw $511, %ax # imm = 0x1FF
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: addw $511, %di # imm = 0x1FF
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: addw $511, (%rsi) # imm = 0x1FF
; SANDY-NEXT: # sched: [7:1.00]
; SANDY-NEXT: addw $7, %di # sched: [1:0.33]
; SANDY-NEXT: addw $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addw %dx, %di # sched: [1:0.33]
; SANDY-NEXT: addw %di, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addw (%rsi), %di # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_add_16:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: addw $511, %ax # imm = 0x1FF
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: addw $511, %di # imm = 0x1FF
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: addw $511, (%rsi) # imm = 0x1FF
; HASWELL-NEXT: # sched: [7:1.00]
; HASWELL-NEXT: addw $7, %di # sched: [1:0.25]
; HASWELL-NEXT: addw $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addw %dx, %di # sched: [1:0.25]
; HASWELL-NEXT: addw %di, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addw (%rsi), %di # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_add_16:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: addw $511, %ax # imm = 0x1FF
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: addw $511, %di # imm = 0x1FF
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: addw $511, (%rsi) # imm = 0x1FF
; BROADWELL-NEXT: # sched: [7:1.00]
; BROADWELL-NEXT: addw $7, %di # sched: [1:0.25]
; BROADWELL-NEXT: addw $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addw %dx, %di # sched: [1:0.25]
; BROADWELL-NEXT: addw %di, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addw (%rsi), %di # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_add_16:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: addw $511, %ax # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: addw $511, %di # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: addw $511, (%rsi) # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [7:1.00]
; SKYLAKE-NEXT: addw $7, %di # sched: [1:0.25]
; SKYLAKE-NEXT: addw $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addw %dx, %di # sched: [1:0.25]
; SKYLAKE-NEXT: addw %di, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addw (%rsi), %di # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_add_16:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: addw $511, %ax # imm = 0x1FF
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: addw $511, %di # imm = 0x1FF
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: addw $511, (%rsi) # imm = 0x1FF
; SKX-NEXT: # sched: [7:1.00]
; SKX-NEXT: addw $7, %di # sched: [1:0.25]
; SKX-NEXT: addw $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addw %dx, %di # sched: [1:0.25]
; SKX-NEXT: addw %di, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addw (%rsi), %di # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_add_16:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: addw $511, %ax # imm = 0x1FF
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: addw $511, %di # imm = 0x1FF
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: addw $511, (%rsi) # imm = 0x1FF
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: addw $7, %di # sched: [1:0.50]
; BDVER2-NEXT: addw $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addw %dx, %di # sched: [1:0.50]
; BDVER2-NEXT: addw %di, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addw (%rsi), %di # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_add_16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: addw $511, %ax # imm = 0x1FF
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: addw $511, %di # imm = 0x1FF
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: addw $511, (%rsi) # imm = 0x1FF
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: addw $7, %di # sched: [1:0.50]
; BTVER2-NEXT: addw $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addw %dx, %di # sched: [1:0.50]
; BTVER2-NEXT: addw %di, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addw (%rsi), %di # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_add_16:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: addw $511, %ax # imm = 0x1FF
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: addw $511, %di # imm = 0x1FF
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: addw $511, (%rsi) # imm = 0x1FF
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: addw $7, %di # sched: [1:0.25]
; ZNVER1-NEXT: addw $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addw %dx, %di # sched: [1:0.25]
; ZNVER1-NEXT: addw %di, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addw (%rsi), %di # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "addw $3, %AX \0A\09 addw $3, $0 \0A\09 addw $3, $2 \0A\09 addw $4, $0 \0A\09 addw $4, $2 \0A\09 addw $1, $0 \0A\09 addw $0, $2 \0A\09 addw $2, $0", "r,r,*m,i,i"(i16 %a0, i16 %a2, i16* %a1, i16 511, i8 7) nounwind
ret void
}
define void @test_add_32(i32 %a0, i32* %a1, i32 %a2) optsize {
; GENERIC-LABEL: test_add_32:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: addl $665536, %eax # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: addl $665536, %edi # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; GENERIC-NEXT: # sched: [7:1.00]
; GENERIC-NEXT: addl $7, %edi # sched: [1:0.33]
; GENERIC-NEXT: addl $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addl %edx, %edi # sched: [1:0.33]
; GENERIC-NEXT: addl %edi, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addl (%rsi), %edi # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_add_32:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: addl $665536, %eax # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: addl $665536, %edi # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: addl $7, %edi # sched: [1:0.50]
; ATOM-NEXT: addl $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addl %edx, %edi # sched: [1:0.50]
; ATOM-NEXT: addl %edi, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addl (%rsi), %edi # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_add_32:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: addl $665536, %eax # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: addl $665536, %edi # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: addl $7, %edi # sched: [1:0.50]
; SLM-NEXT: addl $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addl %edx, %edi # sched: [1:0.50]
; SLM-NEXT: addl %edi, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addl (%rsi), %edi # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_add_32:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: addl $665536, %eax # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: addl $665536, %edi # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; SANDY-NEXT: # sched: [7:1.00]
; SANDY-NEXT: addl $7, %edi # sched: [1:0.33]
; SANDY-NEXT: addl $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addl %edx, %edi # sched: [1:0.33]
; SANDY-NEXT: addl %edi, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addl (%rsi), %edi # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_add_32:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: addl $665536, %eax # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: addl $665536, %edi # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; HASWELL-NEXT: # sched: [7:1.00]
; HASWELL-NEXT: addl $7, %edi # sched: [1:0.25]
; HASWELL-NEXT: addl $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addl %edx, %edi # sched: [1:0.25]
; HASWELL-NEXT: addl %edi, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addl (%rsi), %edi # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_add_32:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: addl $665536, %eax # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: addl $665536, %edi # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [7:1.00]
; BROADWELL-NEXT: addl $7, %edi # sched: [1:0.25]
; BROADWELL-NEXT: addl $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addl %edx, %edi # sched: [1:0.25]
; BROADWELL-NEXT: addl %edi, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addl (%rsi), %edi # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_add_32:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: addl $665536, %eax # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: addl $665536, %edi # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [7:1.00]
; SKYLAKE-NEXT: addl $7, %edi # sched: [1:0.25]
; SKYLAKE-NEXT: addl $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addl %edx, %edi # sched: [1:0.25]
; SKYLAKE-NEXT: addl %edi, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addl (%rsi), %edi # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_add_32:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: addl $665536, %eax # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: addl $665536, %edi # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; SKX-NEXT: # sched: [7:1.00]
; SKX-NEXT: addl $7, %edi # sched: [1:0.25]
; SKX-NEXT: addl $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addl %edx, %edi # sched: [1:0.25]
; SKX-NEXT: addl %edi, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addl (%rsi), %edi # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_add_32:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: addl $665536, %eax # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: addl $665536, %edi # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: addl $7, %edi # sched: [1:0.50]
; BDVER2-NEXT: addl $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addl %edx, %edi # sched: [1:0.50]
; BDVER2-NEXT: addl %edi, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addl (%rsi), %edi # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_add_32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: addl $665536, %eax # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: addl $665536, %edi # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: addl $7, %edi # sched: [1:0.50]
; BTVER2-NEXT: addl $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addl %edx, %edi # sched: [1:0.50]
; BTVER2-NEXT: addl %edi, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addl (%rsi), %edi # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_add_32:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: addl $665536, %eax # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: addl $665536, %edi # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: addl $665536, (%rsi) # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: addl $7, %edi # sched: [1:0.25]
; ZNVER1-NEXT: addl $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addl %edx, %edi # sched: [1:0.25]
; ZNVER1-NEXT: addl %edi, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addl (%rsi), %edi # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "addl $3, %EAX \0A\09 addl $3, $0 \0A\09 addl $3, $2 \0A\09 addl $4, $0 \0A\09 addl $4, $2 \0A\09 addl $1, $0 \0A\09 addl $0, $2 \0A\09 addl $2, $0", "r,r,*m,i,i"(i32 %a0, i32 %a2, i32* %a1, i32 665536, i8 7) nounwind
ret void
}
define void @test_add_64(i64 %a0, i64* %a1, i64 %a2) optsize {
; GENERIC-LABEL: test_add_64:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: addq $665536, %rax # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: addq $665536, %rdi # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; GENERIC-NEXT: # sched: [7:1.00]
; GENERIC-NEXT: addq $7, %rdi # sched: [1:0.33]
; GENERIC-NEXT: addq $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addq %rdx, %rdi # sched: [1:0.33]
; GENERIC-NEXT: addq %rdi, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: addq (%rsi), %rdi # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_add_64:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: addq $665536, %rax # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: addq $665536, %rdi # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: addq $7, %rdi # sched: [1:0.50]
; ATOM-NEXT: addq $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addq %rdx, %rdi # sched: [1:0.50]
; ATOM-NEXT: addq %rdi, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: addq (%rsi), %rdi # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_add_64:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: addq $665536, %rax # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: addq $665536, %rdi # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: addq $7, %rdi # sched: [1:0.50]
; SLM-NEXT: addq $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addq %rdx, %rdi # sched: [1:0.50]
; SLM-NEXT: addq %rdi, (%rsi) # sched: [5:2.00]
; SLM-NEXT: addq (%rsi), %rdi # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_add_64:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: addq $665536, %rax # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: addq $665536, %rdi # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; SANDY-NEXT: # sched: [7:1.00]
; SANDY-NEXT: addq $7, %rdi # sched: [1:0.33]
; SANDY-NEXT: addq $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addq %rdx, %rdi # sched: [1:0.33]
; SANDY-NEXT: addq %rdi, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: addq (%rsi), %rdi # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_add_64:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: addq $665536, %rax # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: addq $665536, %rdi # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; HASWELL-NEXT: # sched: [7:1.00]
; HASWELL-NEXT: addq $7, %rdi # sched: [1:0.25]
; HASWELL-NEXT: addq $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addq %rdx, %rdi # sched: [1:0.25]
; HASWELL-NEXT: addq %rdi, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: addq (%rsi), %rdi # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_add_64:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: addq $665536, %rax # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: addq $665536, %rdi # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [7:1.00]
; BROADWELL-NEXT: addq $7, %rdi # sched: [1:0.25]
; BROADWELL-NEXT: addq $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addq %rdx, %rdi # sched: [1:0.25]
; BROADWELL-NEXT: addq %rdi, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: addq (%rsi), %rdi # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_add_64:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: addq $665536, %rax # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: addq $665536, %rdi # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [7:1.00]
; SKYLAKE-NEXT: addq $7, %rdi # sched: [1:0.25]
; SKYLAKE-NEXT: addq $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addq %rdx, %rdi # sched: [1:0.25]
; SKYLAKE-NEXT: addq %rdi, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: addq (%rsi), %rdi # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_add_64:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: addq $665536, %rax # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: addq $665536, %rdi # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; SKX-NEXT: # sched: [7:1.00]
; SKX-NEXT: addq $7, %rdi # sched: [1:0.25]
; SKX-NEXT: addq $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addq %rdx, %rdi # sched: [1:0.25]
; SKX-NEXT: addq %rdi, (%rsi) # sched: [7:1.00]
; SKX-NEXT: addq (%rsi), %rdi # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_add_64:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: addq $665536, %rax # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: addq $665536, %rdi # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: addq $7, %rdi # sched: [1:0.50]
; BDVER2-NEXT: addq $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addq %rdx, %rdi # sched: [1:0.50]
; BDVER2-NEXT: addq %rdi, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: addq (%rsi), %rdi # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_add_64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: addq $665536, %rax # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: addq $665536, %rdi # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: addq $7, %rdi # sched: [1:0.50]
; BTVER2-NEXT: addq $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addq %rdx, %rdi # sched: [1:0.50]
; BTVER2-NEXT: addq %rdi, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: addq (%rsi), %rdi # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_add_64:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: addq $665536, %rax # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: addq $665536, %rdi # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: addq $665536, (%rsi) # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: addq $7, %rdi # sched: [1:0.25]
; ZNVER1-NEXT: addq $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addq %rdx, %rdi # sched: [1:0.25]
; ZNVER1-NEXT: addq %rdi, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: addq (%rsi), %rdi # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "addq $3, %RAX \0A\09 addq $3, $0 \0A\09 addq $3, $2 \0A\09 addq $4, $0 \0A\09 addq $4, $2 \0A\09 addq $1, $0 \0A\09 addq $0, $2 \0A\09 addq $2, $0", "r,r,*m,i,i"(i64 %a0, i64 %a2, i64* %a1, i32 665536, i8 7) nounwind
ret void
}
define void @test_and_8(i8 %a0, i8* %a1, i8 %a2) optsize {
; GENERIC-LABEL: test_and_8:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: andb $7, %al # sched: [1:0.33]
; GENERIC-NEXT: andb $7, %dil # sched: [1:0.33]
; GENERIC-NEXT: andb $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andb %dl, %dil # sched: [1:0.33]
; GENERIC-NEXT: andb %dil, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andb (%rsi), %dil # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_and_8:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: andb $7, %al # sched: [1:0.50]
; ATOM-NEXT: andb $7, %dil # sched: [1:0.50]
; ATOM-NEXT: andb $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andb %dl, %dil # sched: [1:0.50]
; ATOM-NEXT: andb %dil, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andb (%rsi), %dil # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_and_8:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: andb $7, %al # sched: [1:0.50]
; SLM-NEXT: andb $7, %dil # sched: [1:0.50]
; SLM-NEXT: andb $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andb %dl, %dil # sched: [1:0.50]
; SLM-NEXT: andb %dil, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andb (%rsi), %dil # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_and_8:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: andb $7, %al # sched: [1:0.33]
; SANDY-NEXT: andb $7, %dil # sched: [1:0.33]
; SANDY-NEXT: andb $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andb %dl, %dil # sched: [1:0.33]
; SANDY-NEXT: andb %dil, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andb (%rsi), %dil # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_and_8:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: andb $7, %al # sched: [1:0.25]
; HASWELL-NEXT: andb $7, %dil # sched: [1:0.25]
; HASWELL-NEXT: andb $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andb %dl, %dil # sched: [1:0.25]
; HASWELL-NEXT: andb %dil, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andb (%rsi), %dil # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_and_8:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: andb $7, %al # sched: [1:0.25]
; BROADWELL-NEXT: andb $7, %dil # sched: [1:0.25]
; BROADWELL-NEXT: andb $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andb %dl, %dil # sched: [1:0.25]
; BROADWELL-NEXT: andb %dil, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andb (%rsi), %dil # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_and_8:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: andb $7, %al # sched: [1:0.25]
; SKYLAKE-NEXT: andb $7, %dil # sched: [1:0.25]
; SKYLAKE-NEXT: andb $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andb %dl, %dil # sched: [1:0.25]
; SKYLAKE-NEXT: andb %dil, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andb (%rsi), %dil # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_and_8:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: andb $7, %al # sched: [1:0.25]
; SKX-NEXT: andb $7, %dil # sched: [1:0.25]
; SKX-NEXT: andb $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andb %dl, %dil # sched: [1:0.25]
; SKX-NEXT: andb %dil, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andb (%rsi), %dil # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_and_8:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: andb $7, %al # sched: [1:0.50]
; BDVER2-NEXT: andb $7, %dil # sched: [1:0.50]
; BDVER2-NEXT: andb $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andb %dl, %dil # sched: [1:0.50]
; BDVER2-NEXT: andb %dil, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andb (%rsi), %dil # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_and_8:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: andb $7, %al # sched: [1:0.50]
; BTVER2-NEXT: andb $7, %dil # sched: [1:0.50]
; BTVER2-NEXT: andb $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andb %dl, %dil # sched: [1:0.50]
; BTVER2-NEXT: andb %dil, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andb (%rsi), %dil # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_and_8:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: andb $7, %al # sched: [1:0.25]
; ZNVER1-NEXT: andb $7, %dil # sched: [1:0.25]
; ZNVER1-NEXT: andb $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andb %dl, %dil # sched: [1:0.25]
; ZNVER1-NEXT: andb %dil, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andb (%rsi), %dil # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "andb $3, %AL \0A\09 andb $3, $0 \0A\09 andb $3, $2 \0A\09 andb $1, $0 \0A\09 andb $0, $2 \0A\09 andb $2, $0", "r,r,*m,i"(i8 %a0, i8 %a2, i8* %a1, i8 7) nounwind
ret void
}
define void @test_and_16(i16 %a0, i16* %a1, i16 %a2) optsize {
; GENERIC-LABEL: test_and_16:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: andw $511, %ax # imm = 0x1FF
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: andw $511, %di # imm = 0x1FF
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: andw $511, (%rsi) # imm = 0x1FF
; GENERIC-NEXT: # sched: [7:1.00]
; GENERIC-NEXT: andw $7, %di # sched: [1:0.33]
; GENERIC-NEXT: andw $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andw %dx, %di # sched: [1:0.33]
; GENERIC-NEXT: andw %di, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andw (%rsi), %di # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_and_16:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: andw $511, %ax # imm = 0x1FF
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: andw $511, %di # imm = 0x1FF
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: andw $511, (%rsi) # imm = 0x1FF
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: andw $7, %di # sched: [1:0.50]
; ATOM-NEXT: andw $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andw %dx, %di # sched: [1:0.50]
; ATOM-NEXT: andw %di, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andw (%rsi), %di # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_and_16:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: andw $511, %ax # imm = 0x1FF
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: andw $511, %di # imm = 0x1FF
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: andw $511, (%rsi) # imm = 0x1FF
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: andw $7, %di # sched: [1:0.50]
; SLM-NEXT: andw $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andw %dx, %di # sched: [1:0.50]
; SLM-NEXT: andw %di, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andw (%rsi), %di # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_and_16:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: andw $511, %ax # imm = 0x1FF
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: andw $511, %di # imm = 0x1FF
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: andw $511, (%rsi) # imm = 0x1FF
; SANDY-NEXT: # sched: [7:1.00]
; SANDY-NEXT: andw $7, %di # sched: [1:0.33]
; SANDY-NEXT: andw $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andw %dx, %di # sched: [1:0.33]
; SANDY-NEXT: andw %di, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andw (%rsi), %di # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_and_16:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: andw $511, %ax # imm = 0x1FF
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: andw $511, %di # imm = 0x1FF
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: andw $511, (%rsi) # imm = 0x1FF
; HASWELL-NEXT: # sched: [7:1.00]
; HASWELL-NEXT: andw $7, %di # sched: [1:0.25]
; HASWELL-NEXT: andw $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andw %dx, %di # sched: [1:0.25]
; HASWELL-NEXT: andw %di, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andw (%rsi), %di # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_and_16:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: andw $511, %ax # imm = 0x1FF
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: andw $511, %di # imm = 0x1FF
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: andw $511, (%rsi) # imm = 0x1FF
; BROADWELL-NEXT: # sched: [7:1.00]
; BROADWELL-NEXT: andw $7, %di # sched: [1:0.25]
; BROADWELL-NEXT: andw $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andw %dx, %di # sched: [1:0.25]
; BROADWELL-NEXT: andw %di, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andw (%rsi), %di # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_and_16:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: andw $511, %ax # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: andw $511, %di # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: andw $511, (%rsi) # imm = 0x1FF
; SKYLAKE-NEXT: # sched: [7:1.00]
; SKYLAKE-NEXT: andw $7, %di # sched: [1:0.25]
; SKYLAKE-NEXT: andw $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andw %dx, %di # sched: [1:0.25]
; SKYLAKE-NEXT: andw %di, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andw (%rsi), %di # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_and_16:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: andw $511, %ax # imm = 0x1FF
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: andw $511, %di # imm = 0x1FF
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: andw $511, (%rsi) # imm = 0x1FF
; SKX-NEXT: # sched: [7:1.00]
; SKX-NEXT: andw $7, %di # sched: [1:0.25]
; SKX-NEXT: andw $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andw %dx, %di # sched: [1:0.25]
; SKX-NEXT: andw %di, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andw (%rsi), %di # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_and_16:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: andw $511, %ax # imm = 0x1FF
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: andw $511, %di # imm = 0x1FF
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: andw $511, (%rsi) # imm = 0x1FF
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: andw $7, %di # sched: [1:0.50]
; BDVER2-NEXT: andw $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andw %dx, %di # sched: [1:0.50]
; BDVER2-NEXT: andw %di, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andw (%rsi), %di # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_and_16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: andw $511, %ax # imm = 0x1FF
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: andw $511, %di # imm = 0x1FF
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: andw $511, (%rsi) # imm = 0x1FF
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: andw $7, %di # sched: [1:0.50]
; BTVER2-NEXT: andw $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andw %dx, %di # sched: [1:0.50]
; BTVER2-NEXT: andw %di, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andw (%rsi), %di # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_and_16:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: andw $511, %ax # imm = 0x1FF
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: andw $511, %di # imm = 0x1FF
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: andw $511, (%rsi) # imm = 0x1FF
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: andw $7, %di # sched: [1:0.25]
; ZNVER1-NEXT: andw $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andw %dx, %di # sched: [1:0.25]
; ZNVER1-NEXT: andw %di, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andw (%rsi), %di # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "andw $3, %AX \0A\09 andw $3, $0 \0A\09 andw $3, $2 \0A\09 andw $4, $0 \0A\09 andw $4, $2 \0A\09 andw $1, $0 \0A\09 andw $0, $2 \0A\09 andw $2, $0", "r,r,*m,i,i"(i16 %a0, i16 %a2, i16* %a1, i16 511, i8 7) nounwind
ret void
}
define void @test_and_32(i32 %a0, i32* %a1, i32 %a2) optsize {
; GENERIC-LABEL: test_and_32:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: andl $665536, %eax # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: andl $665536, %edi # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; GENERIC-NEXT: # sched: [7:1.00]
; GENERIC-NEXT: andl $7, %edi # sched: [1:0.33]
; GENERIC-NEXT: andl $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andl %edx, %edi # sched: [1:0.33]
; GENERIC-NEXT: andl %edi, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andl (%rsi), %edi # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_and_32:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: andl $665536, %eax # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: andl $665536, %edi # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: andl $7, %edi # sched: [1:0.50]
; ATOM-NEXT: andl $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andl %edx, %edi # sched: [1:0.50]
; ATOM-NEXT: andl %edi, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andl (%rsi), %edi # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_and_32:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: andl $665536, %eax # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: andl $665536, %edi # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: andl $7, %edi # sched: [1:0.50]
; SLM-NEXT: andl $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andl %edx, %edi # sched: [1:0.50]
; SLM-NEXT: andl %edi, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andl (%rsi), %edi # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_and_32:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: andl $665536, %eax # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: andl $665536, %edi # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; SANDY-NEXT: # sched: [7:1.00]
; SANDY-NEXT: andl $7, %edi # sched: [1:0.33]
; SANDY-NEXT: andl $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andl %edx, %edi # sched: [1:0.33]
; SANDY-NEXT: andl %edi, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andl (%rsi), %edi # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_and_32:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: andl $665536, %eax # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: andl $665536, %edi # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; HASWELL-NEXT: # sched: [7:1.00]
; HASWELL-NEXT: andl $7, %edi # sched: [1:0.25]
; HASWELL-NEXT: andl $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andl %edx, %edi # sched: [1:0.25]
; HASWELL-NEXT: andl %edi, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andl (%rsi), %edi # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_and_32:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: andl $665536, %eax # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: andl $665536, %edi # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [7:1.00]
; BROADWELL-NEXT: andl $7, %edi # sched: [1:0.25]
; BROADWELL-NEXT: andl $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andl %edx, %edi # sched: [1:0.25]
; BROADWELL-NEXT: andl %edi, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andl (%rsi), %edi # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_and_32:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: andl $665536, %eax # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: andl $665536, %edi # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [7:1.00]
; SKYLAKE-NEXT: andl $7, %edi # sched: [1:0.25]
; SKYLAKE-NEXT: andl $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andl %edx, %edi # sched: [1:0.25]
; SKYLAKE-NEXT: andl %edi, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andl (%rsi), %edi # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_and_32:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: andl $665536, %eax # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: andl $665536, %edi # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; SKX-NEXT: # sched: [7:1.00]
; SKX-NEXT: andl $7, %edi # sched: [1:0.25]
; SKX-NEXT: andl $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andl %edx, %edi # sched: [1:0.25]
; SKX-NEXT: andl %edi, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andl (%rsi), %edi # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_and_32:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: andl $665536, %eax # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: andl $665536, %edi # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: andl $7, %edi # sched: [1:0.50]
; BDVER2-NEXT: andl $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andl %edx, %edi # sched: [1:0.50]
; BDVER2-NEXT: andl %edi, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andl (%rsi), %edi # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_and_32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: andl $665536, %eax # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: andl $665536, %edi # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: andl $7, %edi # sched: [1:0.50]
; BTVER2-NEXT: andl $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andl %edx, %edi # sched: [1:0.50]
; BTVER2-NEXT: andl %edi, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andl (%rsi), %edi # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_and_32:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: andl $665536, %eax # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: andl $665536, %edi # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: andl $665536, (%rsi) # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: andl $7, %edi # sched: [1:0.25]
; ZNVER1-NEXT: andl $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andl %edx, %edi # sched: [1:0.25]
; ZNVER1-NEXT: andl %edi, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andl (%rsi), %edi # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "andl $3, %EAX \0A\09 andl $3, $0 \0A\09 andl $3, $2 \0A\09 andl $4, $0 \0A\09 andl $4, $2 \0A\09 andl $1, $0 \0A\09 andl $0, $2 \0A\09 andl $2, $0", "r,r,*m,i,i"(i32 %a0, i32 %a2, i32* %a1, i32 665536, i8 7) nounwind
ret void
}
define void @test_and_64(i64 %a0, i64* %a1, i64 %a2) optsize {
; GENERIC-LABEL: test_and_64:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: andq $665536, %rax # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: andq $665536, %rdi # imm = 0xA27C0
; GENERIC-NEXT: # sched: [1:0.33]
; GENERIC-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; GENERIC-NEXT: # sched: [7:1.00]
; GENERIC-NEXT: andq $7, %rdi # sched: [1:0.33]
; GENERIC-NEXT: andq $7, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andq %rdx, %rdi # sched: [1:0.33]
; GENERIC-NEXT: andq %rdi, (%rsi) # sched: [7:1.00]
; GENERIC-NEXT: andq (%rsi), %rdi # sched: [6:0.50]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_and_64:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: andq $665536, %rax # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: andq $665536, %rdi # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:0.50]
; ATOM-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; ATOM-NEXT: # sched: [1:1.00]
; ATOM-NEXT: andq $7, %rdi # sched: [1:0.50]
; ATOM-NEXT: andq $7, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andq %rdx, %rdi # sched: [1:0.50]
; ATOM-NEXT: andq %rdi, (%rsi) # sched: [1:1.00]
; ATOM-NEXT: andq (%rsi), %rdi # sched: [1:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_and_64:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: andq $665536, %rax # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: andq $665536, %rdi # imm = 0xA27C0
; SLM-NEXT: # sched: [1:0.50]
; SLM-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; SLM-NEXT: # sched: [5:2.00]
; SLM-NEXT: andq $7, %rdi # sched: [1:0.50]
; SLM-NEXT: andq $7, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andq %rdx, %rdi # sched: [1:0.50]
; SLM-NEXT: andq %rdi, (%rsi) # sched: [5:2.00]
; SLM-NEXT: andq (%rsi), %rdi # sched: [4:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_and_64:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: andq $665536, %rax # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: andq $665536, %rdi # imm = 0xA27C0
; SANDY-NEXT: # sched: [1:0.33]
; SANDY-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; SANDY-NEXT: # sched: [7:1.00]
; SANDY-NEXT: andq $7, %rdi # sched: [1:0.33]
; SANDY-NEXT: andq $7, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andq %rdx, %rdi # sched: [1:0.33]
; SANDY-NEXT: andq %rdi, (%rsi) # sched: [7:1.00]
; SANDY-NEXT: andq (%rsi), %rdi # sched: [6:0.50]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_and_64:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: andq $665536, %rax # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: andq $665536, %rdi # imm = 0xA27C0
; HASWELL-NEXT: # sched: [1:0.25]
; HASWELL-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; HASWELL-NEXT: # sched: [7:1.00]
; HASWELL-NEXT: andq $7, %rdi # sched: [1:0.25]
; HASWELL-NEXT: andq $7, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andq %rdx, %rdi # sched: [1:0.25]
; HASWELL-NEXT: andq %rdi, (%rsi) # sched: [7:1.00]
; HASWELL-NEXT: andq (%rsi), %rdi # sched: [6:0.50]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_and_64:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: andq $665536, %rax # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: andq $665536, %rdi # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [1:0.25]
; BROADWELL-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; BROADWELL-NEXT: # sched: [7:1.00]
; BROADWELL-NEXT: andq $7, %rdi # sched: [1:0.25]
; BROADWELL-NEXT: andq $7, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andq %rdx, %rdi # sched: [1:0.25]
; BROADWELL-NEXT: andq %rdi, (%rsi) # sched: [7:1.00]
; BROADWELL-NEXT: andq (%rsi), %rdi # sched: [6:0.50]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_and_64:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: andq $665536, %rax # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: andq $665536, %rdi # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [1:0.25]
; SKYLAKE-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; SKYLAKE-NEXT: # sched: [7:1.00]
; SKYLAKE-NEXT: andq $7, %rdi # sched: [1:0.25]
; SKYLAKE-NEXT: andq $7, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andq %rdx, %rdi # sched: [1:0.25]
; SKYLAKE-NEXT: andq %rdi, (%rsi) # sched: [7:1.00]
; SKYLAKE-NEXT: andq (%rsi), %rdi # sched: [6:0.50]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_and_64:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: andq $665536, %rax # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: andq $665536, %rdi # imm = 0xA27C0
; SKX-NEXT: # sched: [1:0.25]
; SKX-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; SKX-NEXT: # sched: [7:1.00]
; SKX-NEXT: andq $7, %rdi # sched: [1:0.25]
; SKX-NEXT: andq $7, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andq %rdx, %rdi # sched: [1:0.25]
; SKX-NEXT: andq %rdi, (%rsi) # sched: [7:1.00]
; SKX-NEXT: andq (%rsi), %rdi # sched: [6:0.50]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_and_64:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: andq $665536, %rax # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: andq $665536, %rdi # imm = 0xA27C0
; BDVER2-NEXT: # sched: [1:0.50]
; BDVER2-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; BDVER2-NEXT: # sched: [6:1.00]
; BDVER2-NEXT: andq $7, %rdi # sched: [1:0.50]
; BDVER2-NEXT: andq $7, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andq %rdx, %rdi # sched: [1:0.50]
; BDVER2-NEXT: andq %rdi, (%rsi) # sched: [6:1.00]
; BDVER2-NEXT: andq (%rsi), %rdi # sched: [5:0.50]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_and_64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: andq $665536, %rax # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: andq $665536, %rdi # imm = 0xA27C0
; BTVER2-NEXT: # sched: [1:0.50]
; BTVER2-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; BTVER2-NEXT: # sched: [5:1.00]
; BTVER2-NEXT: andq $7, %rdi # sched: [1:0.50]
; BTVER2-NEXT: andq $7, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andq %rdx, %rdi # sched: [1:0.50]
; BTVER2-NEXT: andq %rdi, (%rsi) # sched: [5:1.00]
; BTVER2-NEXT: andq (%rsi), %rdi # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_and_64:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: andq $665536, %rax # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: andq $665536, %rdi # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [1:0.25]
; ZNVER1-NEXT: andq $665536, (%rsi) # imm = 0xA27C0
; ZNVER1-NEXT: # sched: [5:0.50]
; ZNVER1-NEXT: andq $7, %rdi # sched: [1:0.25]
; ZNVER1-NEXT: andq $7, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andq %rdx, %rdi # sched: [1:0.25]
; ZNVER1-NEXT: andq %rdi, (%rsi) # sched: [5:0.50]
; ZNVER1-NEXT: andq (%rsi), %rdi # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "andq $3, %RAX \0A\09 andq $3, $0 \0A\09 andq $3, $2 \0A\09 andq $4, $0 \0A\09 andq $4, $2 \0A\09 andq $1, $0 \0A\09 andq $0, $2 \0A\09 andq $2, $0", "r,r,*m,i,i"(i64 %a0, i64 %a2, i64* %a1, i32 665536, i8 7) nounwind
ret void
}
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: [10:10.00]
; SLM-NEXT: bsfw (%rsi), %cx # sched: [13:10.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: [8: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: [7: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]
;
; BDVER2-LABEL: test_bsf16:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: bsfw %di, %ax # sched: [3:2.00]
; BDVER2-NEXT: bsfw (%rsi), %cx # sched: [7:2.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
; BDVER2-NEXT: # kill: def $ax killed $ax killed $eax
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bsf16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: bsfw %di, %ax # sched: [4:4.00]
; BTVER2-NEXT: bsfw (%rsi), %cx # sched: [7:4.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: [10:10.00]
; SLM-NEXT: bsfl (%rsi), %ecx # sched: [13:10.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: [8:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
; HASWELL-NEXT: retq # sched: [7: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]
;
; BDVER2-LABEL: test_bsf32:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: bsfl %edi, %eax # sched: [3:2.00]
; BDVER2-NEXT: bsfl (%rsi), %ecx # sched: [7:2.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bsf32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: bsfl %edi, %eax # sched: [4:4.00]
; BTVER2-NEXT: bsfl (%rsi), %ecx # sched: [7:4.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: [10:10.00]
; SLM-NEXT: bsfq (%rsi), %rcx # sched: [13:10.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: [8:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: orq %rcx, %rax # sched: [1:0.25]
; HASWELL-NEXT: retq # sched: [7: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]
;
; BDVER2-LABEL: test_bsf64:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: bsfq %rdi, %rax # sched: [3:2.00]
; BDVER2-NEXT: bsfq (%rsi), %rcx # sched: [7:2.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: orq %rcx, %rax # sched: [1:0.50]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bsf64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: bsfq %rdi, %rax # sched: [4:4.00]
; BTVER2-NEXT: bsfq (%rsi), %rcx # sched: [7:4.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: [10:10.00]
; SLM-NEXT: bsrw (%rsi), %cx # sched: [13:10.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: [8: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: [7: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]
;
; BDVER2-LABEL: test_bsr16:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: bsrw %di, %ax # sched: [4:2.00]
; BDVER2-NEXT: bsrw (%rsi), %cx # sched: [8:2.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
; BDVER2-NEXT: # kill: def $ax killed $ax killed $eax
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bsr16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: bsrw %di, %ax # sched: [5:4.00]
; BTVER2-NEXT: bsrw (%rsi), %cx # sched: [8:4.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: [10:10.00]
; SLM-NEXT: bsrl (%rsi), %ecx # sched: [13:10.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: [8:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: orl %ecx, %eax # sched: [1:0.25]
; HASWELL-NEXT: retq # sched: [7: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]
;
; BDVER2-LABEL: test_bsr32:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: bsrl %edi, %eax # sched: [4:2.00]
; BDVER2-NEXT: bsrl (%rsi), %ecx # sched: [8:2.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: orl %ecx, %eax # sched: [1:0.50]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bsr32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: bsrl %edi, %eax # sched: [5:4.00]
; BTVER2-NEXT: bsrl (%rsi), %ecx # sched: [8:4.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: [10:10.00]
; SLM-NEXT: bsrq (%rsi), %rcx # sched: [13:10.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: [8:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: orq %rcx, %rax # sched: [1:0.25]
; HASWELL-NEXT: retq # sched: [7: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]
;
; BDVER2-LABEL: test_bsr64:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: bsrq %rdi, %rax # sched: [4:2.00]
; BDVER2-NEXT: bsrq (%rsi), %rcx # sched: [8:2.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: orq %rcx, %rax # sched: [1:0.50]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bsr64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: bsrq %rdi, %rax # sched: [5:4.00]
; BTVER2-NEXT: bsrq (%rsi), %rcx # sched: [8:4.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: movl %edi, %eax # sched: [1:0.33]
; GENERIC-NEXT: bswapl %eax # sched: [1:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_bswap32:
; ATOM: # %bb.0:
; ATOM-NEXT: movl %edi, %eax # sched: [1:0.50]
; ATOM-NEXT: bswapl %eax # sched: [1:1.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_bswap32:
; SLM: # %bb.0:
; SLM-NEXT: movl %edi, %eax # sched: [1:0.50]
; SLM-NEXT: bswapl %eax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_bswap32:
; SANDY: # %bb.0:
; SANDY-NEXT: movl %edi, %eax # sched: [1:0.33]
; SANDY-NEXT: bswapl %eax # sched: [1:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_bswap32:
; HASWELL: # %bb.0:
; HASWELL-NEXT: movl %edi, %eax # sched: [1:0.25]
; HASWELL-NEXT: bswapl %eax # sched: [1:0.50]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_bswap32:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: movl %edi, %eax # sched: [1:0.25]
; BROADWELL-NEXT: bswapl %eax # sched: [1:0.50]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_bswap32:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: movl %edi, %eax # sched: [1:0.25]
; SKYLAKE-NEXT: bswapl %eax # sched: [1:0.50]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_bswap32:
; SKX: # %bb.0:
; SKX-NEXT: movl %edi, %eax # sched: [1:0.25]
; SKX-NEXT: bswapl %eax # sched: [1:0.50]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_bswap32:
; BDVER2: # %bb.0:
; BDVER2-NEXT: movl %edi, %eax # sched: [1:0.50]
; BDVER2-NEXT: bswapl %eax # sched: [1:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bswap32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: movl %edi, %eax # sched: [1:0.50]
; BTVER2-NEXT: bswapl %eax # sched: [1:0.50]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_bswap32:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: movl %edi, %eax # sched: [1:0.25]
; ZNVER1-NEXT: bswapl %eax # sched: [1:1.00]
; 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: movq %rdi, %rax # sched: [1:0.33]
; GENERIC-NEXT: bswapq %rax # sched: [2:1.00]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_bswap64:
; ATOM: # %bb.0:
; ATOM-NEXT: movq %rdi, %rax # sched: [1:0.50]
; ATOM-NEXT: bswapq %rax # sched: [1:1.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_bswap64:
; SLM: # %bb.0:
; SLM-NEXT: movq %rdi, %rax # sched: [1:0.50]
; SLM-NEXT: bswapq %rax # sched: [1:0.50]
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_bswap64:
; SANDY: # %bb.0:
; SANDY-NEXT: movq %rdi, %rax # sched: [1:0.33]
; SANDY-NEXT: bswapq %rax # sched: [2:1.00]
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_bswap64:
; HASWELL: # %bb.0:
; HASWELL-NEXT: movq %rdi, %rax # sched: [1:0.25]
; HASWELL-NEXT: bswapq %rax # sched: [2:0.50]
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_bswap64:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: movq %rdi, %rax # sched: [1:0.25]
; BROADWELL-NEXT: bswapq %rax # sched: [2:0.50]
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_bswap64:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: movq %rdi, %rax # sched: [1:0.25]
; SKYLAKE-NEXT: bswapq %rax # sched: [2:0.50]
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_bswap64:
; SKX: # %bb.0:
; SKX-NEXT: movq %rdi, %rax # sched: [1:0.25]
; SKX-NEXT: bswapq %rax # sched: [2:0.50]
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_bswap64:
; BDVER2: # %bb.0:
; BDVER2-NEXT: movq %rdi, %rax # sched: [1:0.50]
; BDVER2-NEXT: bswapq %rax # sched: [1:1.00]
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bswap64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: movq %rdi, %rax # sched: [1:0.50]
; BTVER2-NEXT: bswapq %rax # sched: [1:0.50]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_bswap64:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: movq %rdi, %rax # sched: [1:0.25]
; ZNVER1-NEXT: bswapq %rax # sched: [1:1.00]
; ZNVER1-NEXT: retq # sched: [1:0.50]
%1 = tail call i64 asm "bswap $0", "=r,0"(i64 %a0) nounwind
ret i64 %1
}
define void @test_bt_btc_btr_bts_16(i16 %a0, i16 %a1, i16 *%a2) optsize {
; GENERIC-LABEL: test_bt_btc_btr_bts_16:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: btw %si, %di # sched: [1:0.50]
; GENERIC-NEXT: btcw %si, %di # sched: [1:0.50]
; GENERIC-NEXT: btrw %si, %di # sched: [1:0.50]
; GENERIC-NEXT: btsw %si, %di # sched: [1:0.50]
; GENERIC-NEXT: btw %si, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btcw %si, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btrw %si, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btsw %si, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btw $7, %di # sched: [1:0.50]
; GENERIC-NEXT: btcw $7, %di # sched: [1:0.50]
; GENERIC-NEXT: btrw $7, %di # sched: [1:0.50]
; GENERIC-NEXT: btsw $7, %di # sched: [1:0.50]
; GENERIC-NEXT: btw $7, (%rdx) # sched: [6:0.50]
; GENERIC-NEXT: btcw $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: btrw $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: btsw $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_bt_btc_btr_bts_16:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: btw %si, %di # sched: [1:1.00]
; ATOM-NEXT: btcw %si, %di # sched: [1:1.00]
; ATOM-NEXT: btrw %si, %di # sched: [1:1.00]
; ATOM-NEXT: btsw %si, %di # sched: [1:1.00]
; ATOM-NEXT: btw %si, (%rdx) # sched: [9:4.50]
; ATOM-NEXT: btcw %si, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btrw %si, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btsw %si, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btw $7, %di # sched: [1:1.00]
; ATOM-NEXT: btcw $7, %di # sched: [1:1.00]
; ATOM-NEXT: btrw $7, %di # sched: [1:1.00]
; ATOM-NEXT: btsw $7, %di # sched: [1:1.00]
; ATOM-NEXT: btw $7, (%rdx) # sched: [1:1.00]
; ATOM-NEXT: btcw $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: btrw $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: btsw $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_bt_btc_btr_bts_16:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: btw %si, %di # sched: [1:0.50]
; SLM-NEXT: btcw %si, %di # sched: [1:0.50]
; SLM-NEXT: btrw %si, %di # sched: [1:0.50]
; SLM-NEXT: btsw %si, %di # sched: [1:0.50]
; SLM-NEXT: btw %si, (%rdx) # sched: [4:1.00]
; SLM-NEXT: btcw %si, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btrw %si, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btsw %si, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btw $7, %di # sched: [1:0.50]
; SLM-NEXT: btcw $7, %di # sched: [1:0.50]
; SLM-NEXT: btrw $7, %di # sched: [1:0.50]
; SLM-NEXT: btsw $7, %di # sched: [1:0.50]
; SLM-NEXT: btw $7, (%rdx) # sched: [4:1.00]
; SLM-NEXT: btcw $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btrw $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btsw $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_bt_btc_btr_bts_16:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: btw %si, %di # sched: [1:0.50]
; SANDY-NEXT: btcw %si, %di # sched: [1:0.50]
; SANDY-NEXT: btrw %si, %di # sched: [1:0.50]
; SANDY-NEXT: btsw %si, %di # sched: [1:0.50]
; SANDY-NEXT: btw %si, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btcw %si, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btrw %si, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btsw %si, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btw $7, %di # sched: [1:0.50]
; SANDY-NEXT: btcw $7, %di # sched: [1:0.50]
; SANDY-NEXT: btrw $7, %di # sched: [1:0.50]
; SANDY-NEXT: btsw $7, %di # sched: [1:0.50]
; SANDY-NEXT: btw $7, (%rdx) # sched: [6:0.50]
; SANDY-NEXT: btcw $7, (%rdx) # sched: [7:1.00]
; SANDY-NEXT: btrw $7, (%rdx) # sched: [7:1.00]
; SANDY-NEXT: btsw $7, (%rdx) # sched: [7:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_bt_btc_btr_bts_16:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: btw %si, %di # sched: [1:0.50]
; HASWELL-NEXT: btcw %si, %di # sched: [1:0.50]
; HASWELL-NEXT: btrw %si, %di # sched: [1:0.50]
; HASWELL-NEXT: btsw %si, %di # sched: [1:0.50]
; HASWELL-NEXT: btw %si, (%rdx) # sched: [1:2.50]
; HASWELL-NEXT: btcw %si, (%rdx) # sched: [1:2.75]
; HASWELL-NEXT: btrw %si, (%rdx) # sched: [1:2.75]
; HASWELL-NEXT: btsw %si, (%rdx) # sched: [1:2.75]
; HASWELL-NEXT: btw $7, %di # sched: [1:0.50]
; HASWELL-NEXT: btcw $7, %di # sched: [1:0.50]
; HASWELL-NEXT: btrw $7, %di # sched: [1:0.50]
; HASWELL-NEXT: btsw $7, %di # sched: [1:0.50]
; HASWELL-NEXT: btw $7, (%rdx) # sched: [6:0.50]
; HASWELL-NEXT: btcw $7, (%rdx) # sched: [7:1.00]
; HASWELL-NEXT: btrw $7, (%rdx) # sched: [7:1.00]
; HASWELL-NEXT: btsw $7, (%rdx) # sched: [7:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_bt_btc_btr_bts_16:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: btw %si, %di # sched: [1:0.50]
; BROADWELL-NEXT: btcw %si, %di # sched: [1:0.50]
; BROADWELL-NEXT: btrw %si, %di # sched: [1:0.50]
; BROADWELL-NEXT: btsw %si, %di # sched: [1:0.50]
; BROADWELL-NEXT: btw %si, (%rdx) # sched: [6:0.50]
; BROADWELL-NEXT: btcw %si, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btrw %si, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btsw %si, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btw $7, %di # sched: [1:0.50]
; BROADWELL-NEXT: btcw $7, %di # sched: [1:0.50]
; BROADWELL-NEXT: btrw $7, %di # sched: [1:0.50]
; BROADWELL-NEXT: btsw $7, %di # sched: [1:0.50]
; BROADWELL-NEXT: btw $7, (%rdx) # sched: [6:0.50]
; BROADWELL-NEXT: btcw $7, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btrw $7, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btsw $7, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_bt_btc_btr_bts_16:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: btw %si, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btcw %si, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btrw %si, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btsw %si, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btw %si, (%rdx) # sched: [6:0.50]
; SKYLAKE-NEXT: btcw %si, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btrw %si, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btsw %si, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btw $7, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btcw $7, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btrw $7, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btsw $7, %di # sched: [1:0.50]
; SKYLAKE-NEXT: btw $7, (%rdx) # sched: [6:0.50]
; SKYLAKE-NEXT: btcw $7, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btrw $7, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btsw $7, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_bt_btc_btr_bts_16:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: btw %si, %di # sched: [1:0.50]
; SKX-NEXT: btcw %si, %di # sched: [1:0.50]
; SKX-NEXT: btrw %si, %di # sched: [1:0.50]
; SKX-NEXT: btsw %si, %di # sched: [1:0.50]
; SKX-NEXT: btw %si, (%rdx) # sched: [6:0.50]
; SKX-NEXT: btcw %si, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btrw %si, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btsw %si, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btw $7, %di # sched: [1:0.50]
; SKX-NEXT: btcw $7, %di # sched: [1:0.50]
; SKX-NEXT: btrw $7, %di # sched: [1:0.50]
; SKX-NEXT: btsw $7, %di # sched: [1:0.50]
; SKX-NEXT: btw $7, (%rdx) # sched: [6:0.50]
; SKX-NEXT: btcw $7, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btrw $7, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btsw $7, (%rdx) # sched: [6:1.00]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_bt_btc_btr_bts_16:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: btw %si, %di # sched: [1:0.50]
; BDVER2-NEXT: btcw %si, %di # sched: [2:0.50]
; BDVER2-NEXT: btrw %si, %di # sched: [2:0.50]
; BDVER2-NEXT: btsw %si, %di # sched: [2:0.50]
; BDVER2-NEXT: btw %si, (%rdx) # sched: [5:0.50]
; BDVER2-NEXT: btcw %si, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btrw %si, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btsw %si, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btw $7, %di # sched: [1:0.50]
; BDVER2-NEXT: btcw $7, %di # sched: [2:0.50]
; BDVER2-NEXT: btrw $7, %di # sched: [2:0.50]
; BDVER2-NEXT: btsw $7, %di # sched: [2:0.50]
; BDVER2-NEXT: btw $7, (%rdx) # sched: [5:0.50]
; BDVER2-NEXT: btcw $7, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btrw $7, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btsw $7, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bt_btc_btr_bts_16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: btw %si, %di # sched: [1:0.50]
; BTVER2-NEXT: btcw %si, %di # sched: [1:0.50]
; BTVER2-NEXT: btrw %si, %di # sched: [1:0.50]
; BTVER2-NEXT: btsw %si, %di # sched: [1:0.50]
; BTVER2-NEXT: btw %si, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btcw %si, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btrw %si, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btsw %si, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btw $7, %di # sched: [1:0.50]
; BTVER2-NEXT: btcw $7, %di # sched: [1:0.50]
; BTVER2-NEXT: btrw $7, %di # sched: [1:0.50]
; BTVER2-NEXT: btsw $7, %di # sched: [1:0.50]
; BTVER2-NEXT: btw $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btcw $7, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btrw $7, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btsw $7, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_bt_btc_btr_bts_16:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: btw %si, %di # sched: [1:0.25]
; ZNVER1-NEXT: btcw %si, %di # sched: [2:0.25]
; ZNVER1-NEXT: btrw %si, %di # sched: [2:0.25]
; ZNVER1-NEXT: btsw %si, %di # sched: [2:0.25]
; ZNVER1-NEXT: btw %si, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: btcw %si, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btrw %si, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btsw %si, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btw $7, %di # sched: [1:0.25]
; ZNVER1-NEXT: btcw $7, %di # sched: [2:0.25]
; ZNVER1-NEXT: btrw $7, %di # sched: [2:0.25]
; ZNVER1-NEXT: btsw $7, %di # sched: [2:0.25]
; ZNVER1-NEXT: btw $7, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: btcw $7, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btrw $7, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btsw $7, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
call void asm sideeffect "btw $1, $0 \0A\09 btcw $1, $0 \0A\09 btrw $1, $0 \0A\09 btsw $1, $0 \0A\09 btw $1, $2 \0A\09 btcw $1, $2 \0A\09 btrw $1, $2 \0A\09 btsw $1, $2 \0A\09 btw $3, $0 \0A\09 btcw $3, $0 \0A\09 btrw $3, $0 \0A\09 btsw $3, $0 \0A\09 btw $3, $2 \0A\09 btcw $3, $2 \0A\09 btrw $3, $2 \0A\09 btsw $3, $2", "r,r,*m,i"(i16 %a0, i16 %a1, i16 *%a2, i8 7)
ret void
}
define void @test_bt_btc_btr_bts_32(i32 %a0, i32 %a1, i32 *%a2) optsize {
; GENERIC-LABEL: test_bt_btc_btr_bts_32:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: btl %esi, %edi # sched: [1:0.50]
; GENERIC-NEXT: btcl %esi, %edi # sched: [1:0.50]
; GENERIC-NEXT: btrl %esi, %edi # sched: [1:0.50]
; GENERIC-NEXT: btsl %esi, %edi # sched: [1:0.50]
; GENERIC-NEXT: btl %esi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btcl %esi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btrl %esi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btsl %esi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btl $7, %edi # sched: [1:0.50]
; GENERIC-NEXT: btcl $7, %edi # sched: [1:0.50]
; GENERIC-NEXT: btrl $7, %edi # sched: [1:0.50]
; GENERIC-NEXT: btsl $7, %edi # sched: [1:0.50]
; GENERIC-NEXT: btl $7, (%rdx) # sched: [6:0.50]
; GENERIC-NEXT: btcl $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: btrl $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: btsl $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_bt_btc_btr_bts_32:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: btl %esi, %edi # sched: [1:1.00]
; ATOM-NEXT: btcl %esi, %edi # sched: [1:1.00]
; ATOM-NEXT: btrl %esi, %edi # sched: [1:1.00]
; ATOM-NEXT: btsl %esi, %edi # sched: [1:1.00]
; ATOM-NEXT: btl %esi, (%rdx) # sched: [9:4.50]
; ATOM-NEXT: btcl %esi, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btrl %esi, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btsl %esi, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btl $7, %edi # sched: [1:1.00]
; ATOM-NEXT: btcl $7, %edi # sched: [1:1.00]
; ATOM-NEXT: btrl $7, %edi # sched: [1:1.00]
; ATOM-NEXT: btsl $7, %edi # sched: [1:1.00]
; ATOM-NEXT: btl $7, (%rdx) # sched: [1:1.00]
; ATOM-NEXT: btcl $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: btrl $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: btsl $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_bt_btc_btr_bts_32:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: btl %esi, %edi # sched: [1:0.50]
; SLM-NEXT: btcl %esi, %edi # sched: [1:0.50]
; SLM-NEXT: btrl %esi, %edi # sched: [1:0.50]
; SLM-NEXT: btsl %esi, %edi # sched: [1:0.50]
; SLM-NEXT: btl %esi, (%rdx) # sched: [4:1.00]
; SLM-NEXT: btcl %esi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btrl %esi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btsl %esi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btl $7, %edi # sched: [1:0.50]
; SLM-NEXT: btcl $7, %edi # sched: [1:0.50]
; SLM-NEXT: btrl $7, %edi # sched: [1:0.50]
; SLM-NEXT: btsl $7, %edi # sched: [1:0.50]
; SLM-NEXT: btl $7, (%rdx) # sched: [4:1.00]
; SLM-NEXT: btcl $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btrl $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btsl $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_bt_btc_btr_bts_32:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: btl %esi, %edi # sched: [1:0.50]
; SANDY-NEXT: btcl %esi, %edi # sched: [1:0.50]
; SANDY-NEXT: btrl %esi, %edi # sched: [1:0.50]
; SANDY-NEXT: btsl %esi, %edi # sched: [1:0.50]
; SANDY-NEXT: btl %esi, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btcl %esi, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btrl %esi, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btsl %esi, (%rdx) # sched: [9:1.00]
; SANDY-NEXT: btl $7, %edi # sched: [1:0.50]
; SANDY-NEXT: btcl $7, %edi # sched: [1:0.50]
; SANDY-NEXT: btrl $7, %edi # sched: [1:0.50]
; SANDY-NEXT: btsl $7, %edi # sched: [1:0.50]
; SANDY-NEXT: btl $7, (%rdx) # sched: [6:0.50]
; SANDY-NEXT: btcl $7, (%rdx) # sched: [7:1.00]
; SANDY-NEXT: btrl $7, (%rdx) # sched: [7:1.00]
; SANDY-NEXT: btsl $7, (%rdx) # sched: [7:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_bt_btc_btr_bts_32:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: btl %esi, %edi # sched: [1:0.50]
; HASWELL-NEXT: btcl %esi, %edi # sched: [1:0.50]
; HASWELL-NEXT: btrl %esi, %edi # sched: [1:0.50]
; HASWELL-NEXT: btsl %esi, %edi # sched: [1:0.50]
; HASWELL-NEXT: btl %esi, (%rdx) # sched: [1:2.50]
; HASWELL-NEXT: btcl %esi, (%rdx) # sched: [1:2.75]
; HASWELL-NEXT: btrl %esi, (%rdx) # sched: [1:2.75]
; HASWELL-NEXT: btsl %esi, (%rdx) # sched: [1:2.75]
; HASWELL-NEXT: btl $7, %edi # sched: [1:0.50]
; HASWELL-NEXT: btcl $7, %edi # sched: [1:0.50]
; HASWELL-NEXT: btrl $7, %edi # sched: [1:0.50]
; HASWELL-NEXT: btsl $7, %edi # sched: [1:0.50]
; HASWELL-NEXT: btl $7, (%rdx) # sched: [6:0.50]
; HASWELL-NEXT: btcl $7, (%rdx) # sched: [7:1.00]
; HASWELL-NEXT: btrl $7, (%rdx) # sched: [7:1.00]
; HASWELL-NEXT: btsl $7, (%rdx) # sched: [7:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_bt_btc_btr_bts_32:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: btl %esi, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btcl %esi, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btrl %esi, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btsl %esi, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btl %esi, (%rdx) # sched: [6:0.50]
; BROADWELL-NEXT: btcl %esi, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btrl %esi, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btsl %esi, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btl $7, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btcl $7, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btrl $7, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btsl $7, %edi # sched: [1:0.50]
; BROADWELL-NEXT: btl $7, (%rdx) # sched: [6:0.50]
; BROADWELL-NEXT: btcl $7, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btrl $7, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: btsl $7, (%rdx) # sched: [6:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_bt_btc_btr_bts_32:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: btl %esi, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btcl %esi, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btrl %esi, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btsl %esi, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btl %esi, (%rdx) # sched: [6:0.50]
; SKYLAKE-NEXT: btcl %esi, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btrl %esi, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btsl %esi, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btl $7, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btcl $7, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btrl $7, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btsl $7, %edi # sched: [1:0.50]
; SKYLAKE-NEXT: btl $7, (%rdx) # sched: [6:0.50]
; SKYLAKE-NEXT: btcl $7, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btrl $7, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: btsl $7, (%rdx) # sched: [6:1.00]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_bt_btc_btr_bts_32:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: btl %esi, %edi # sched: [1:0.50]
; SKX-NEXT: btcl %esi, %edi # sched: [1:0.50]
; SKX-NEXT: btrl %esi, %edi # sched: [1:0.50]
; SKX-NEXT: btsl %esi, %edi # sched: [1:0.50]
; SKX-NEXT: btl %esi, (%rdx) # sched: [6:0.50]
; SKX-NEXT: btcl %esi, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btrl %esi, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btsl %esi, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btl $7, %edi # sched: [1:0.50]
; SKX-NEXT: btcl $7, %edi # sched: [1:0.50]
; SKX-NEXT: btrl $7, %edi # sched: [1:0.50]
; SKX-NEXT: btsl $7, %edi # sched: [1:0.50]
; SKX-NEXT: btl $7, (%rdx) # sched: [6:0.50]
; SKX-NEXT: btcl $7, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btrl $7, (%rdx) # sched: [6:1.00]
; SKX-NEXT: btsl $7, (%rdx) # sched: [6:1.00]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BDVER2-LABEL: test_bt_btc_btr_bts_32:
; BDVER2: # %bb.0:
; BDVER2-NEXT: #APP
; BDVER2-NEXT: btl %esi, %edi # sched: [1:0.50]
; BDVER2-NEXT: btcl %esi, %edi # sched: [2:0.50]
; BDVER2-NEXT: btrl %esi, %edi # sched: [2:0.50]
; BDVER2-NEXT: btsl %esi, %edi # sched: [2:0.50]
; BDVER2-NEXT: btl %esi, (%rdx) # sched: [5:0.50]
; BDVER2-NEXT: btcl %esi, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btrl %esi, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btsl %esi, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btl $7, %edi # sched: [1:0.50]
; BDVER2-NEXT: btcl $7, %edi # sched: [2:0.50]
; BDVER2-NEXT: btrl $7, %edi # sched: [2:0.50]
; BDVER2-NEXT: btsl $7, %edi # sched: [2:0.50]
; BDVER2-NEXT: btl $7, (%rdx) # sched: [5:0.50]
; BDVER2-NEXT: btcl $7, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btrl $7, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: btsl $7, (%rdx) # sched: [7:1.00]
; BDVER2-NEXT: #NO_APP
; BDVER2-NEXT: retq # sched: [5:1.00]
;
; BTVER2-LABEL: test_bt_btc_btr_bts_32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: btl %esi, %edi # sched: [1:0.50]
; BTVER2-NEXT: btcl %esi, %edi # sched: [1:0.50]
; BTVER2-NEXT: btrl %esi, %edi # sched: [1:0.50]
; BTVER2-NEXT: btsl %esi, %edi # sched: [1:0.50]
; BTVER2-NEXT: btl %esi, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btcl %esi, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btrl %esi, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btsl %esi, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btl $7, %edi # sched: [1:0.50]
; BTVER2-NEXT: btcl $7, %edi # sched: [1:0.50]
; BTVER2-NEXT: btrl $7, %edi # sched: [1:0.50]
; BTVER2-NEXT: btsl $7, %edi # sched: [1:0.50]
; BTVER2-NEXT: btl $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btcl $7, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btrl $7, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: btsl $7, (%rdx) # sched: [5:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_bt_btc_btr_bts_32:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: btl %esi, %edi # sched: [1:0.25]
; ZNVER1-NEXT: btcl %esi, %edi # sched: [2:0.25]
; ZNVER1-NEXT: btrl %esi, %edi # sched: [2:0.25]
; ZNVER1-NEXT: btsl %esi, %edi # sched: [2:0.25]
; ZNVER1-NEXT: btl %esi, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: btcl %esi, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btrl %esi, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btsl %esi, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btl $7, %edi # sched: [1:0.25]
; ZNVER1-NEXT: btcl $7, %edi # sched: [2:0.25]
; ZNVER1-NEXT: btrl $7, %edi # sched: [2:0.25]
; ZNVER1-NEXT: btsl $7, %edi # sched: [2:0.25]
; ZNVER1-NEXT: btl $7, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: btcl $7, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btrl $7, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: btsl $7, (%rdx) # sched: [6:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
call void asm sideeffect "btl $1, $0 \0A\09 btcl $1, $0 \0A\09 btrl $1, $0 \0A\09 btsl $1, $0 \0A\09 btl $1, $2 \0A\09 btcl $1, $2 \0A\09 btrl $1, $2 \0A\09 btsl $1, $2 \0A\09 btl $3, $0 \0A\09 btcl $3, $0 \0A\09 btrl $3, $0 \0A\09 btsl $3, $0 \0A\09 btl $3, $2 \0A\09 btcl $3, $2 \0A\09 btrl $3, $2 \0A\09 btsl $3, $2", "r,r,*m,i"(i32 %a0, i32 %a1, i32 *%a2, i8 7)
ret void
}
define void @test_bt_btc_btr_bts_64(i64 %a0, i64 %a1, i64 *%a2) optsize {
; GENERIC-LABEL: test_bt_btc_btr_bts_64:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: btq %rsi, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btcq %rsi, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btrq %rsi, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btsq %rsi, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btq %rsi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btcq %rsi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btrq %rsi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btsq %rsi, (%rdx) # sched: [9:1.00]
; GENERIC-NEXT: btq $7, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btcq $7, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btrq $7, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btsq $7, %rdi # sched: [1:0.50]
; GENERIC-NEXT: btq $7, (%rdx) # sched: [6:0.50]
; GENERIC-NEXT: btcq $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: btrq $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: btsq $7, (%rdx) # sched: [7:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_bt_btc_btr_bts_64:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: btq %rsi, %rdi # sched: [1:1.00]
; ATOM-NEXT: btcq %rsi, %rdi # sched: [1:1.00]
; ATOM-NEXT: btrq %rsi, %rdi # sched: [1:1.00]
; ATOM-NEXT: btsq %rsi, %rdi # sched: [1:1.00]
; ATOM-NEXT: btq %rsi, (%rdx) # sched: [9:4.50]
; ATOM-NEXT: btcq %rsi, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btrq %rsi, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btsq %rsi, (%rdx) # sched: [11:5.50]
; ATOM-NEXT: btq $7, %rdi # sched: [1:1.00]
; ATOM-NEXT: btcq $7, %rdi # sched: [1:1.00]
; ATOM-NEXT: btrq $7, %rdi # sched: [1:1.00]
; ATOM-NEXT: btsq $7, %rdi # sched: [1:1.00]
; ATOM-NEXT: btq $7, (%rdx) # sched: [1:1.00]
; ATOM-NEXT: btcq $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: btrq $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: btsq $7, (%rdx) # sched: [2:1.00]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_bt_btc_btr_bts_64:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: btq %rsi, %rdi # sched: [1:0.50]
; SLM-NEXT: btcq %rsi, %rdi # sched: [1:0.50]
; SLM-NEXT: btrq %rsi, %rdi # sched: [1:0.50]
; SLM-NEXT: btsq %rsi, %rdi # sched: [1:0.50]
; SLM-NEXT: btq %rsi, (%rdx) # sched: [4:1.00]
; SLM-NEXT: btcq %rsi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btrq %rsi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btsq %rsi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btq $7, %rdi # sched: [1:0.50]