// Note that these instructions aren't slow because that only applies when the
// other operand is in a register. When it's an immediate, bt is still fast.
-let SchedRW = [WriteALU] in {
+let SchedRW = [WriteALULd] in {
def BT16mi8 : Ii8<0xBA, MRM4m, (outs), (ins i16mem:$src1, i16i8imm:$src2),
"bt{w}\t{$src2, $src1|$src1, $src2}",
[(set EFLAGS, (X86bt (loadi16 addr:$src1),
; 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:0.50]
+; 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]
; 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: [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]
; 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: [1:0.50]
+; BTVER2-NEXT: btw $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btcw $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btrw $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btsw $7, (%rdx) # sched: [4: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:0.50]
+; 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]
; 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: [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]
; 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: [1:0.50]
+; BTVER2-NEXT: btl $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btcl $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btrl $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btsl $7, (%rdx) # sched: [4: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:0.50]
+; 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]
; SLM-NEXT: btcq $7, %rdi # sched: [1:0.50]
; SLM-NEXT: btrq $7, %rdi # sched: [1:0.50]
; SLM-NEXT: btsq $7, %rdi # sched: [1:0.50]
-; SLM-NEXT: btq $7, (%rdx) # sched: [1:0.50]
+; SLM-NEXT: btq $7, (%rdx) # sched: [4:1.00]
; SLM-NEXT: btcq $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btrq $7, (%rdx) # sched: [4:2.00]
; SLM-NEXT: btsq $7, (%rdx) # sched: [4:2.00]
; BTVER2-NEXT: btcq $7, %rdi # sched: [1:0.50]
; BTVER2-NEXT: btrq $7, %rdi # sched: [1:0.50]
; BTVER2-NEXT: btsq $7, %rdi # sched: [1:0.50]
-; BTVER2-NEXT: btq $7, (%rdx) # sched: [1:0.50]
+; BTVER2-NEXT: btq $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btcq $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btrq $7, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: btsq $7, (%rdx) # sched: [4:1.00]
# CHECK-NEXT: 1 1 1.00 btcw $7, %di
# CHECK-NEXT: 1 1 1.00 btrw $7, %di
# CHECK-NEXT: 1 1 1.00 btsw $7, %di
-# CHECK-NEXT: 1 1 0.50 * btw $7, (%rax)
+# CHECK-NEXT: 1 1 1.00 * btw $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btcw $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btrw $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btsw $7, (%rax)
# CHECK-NEXT: 1 1 1.00 btcl $7, %edi
# CHECK-NEXT: 1 1 1.00 btrl $7, %edi
# CHECK-NEXT: 1 1 1.00 btsl $7, %edi
-# CHECK-NEXT: 1 1 0.50 * btl $7, (%rax)
+# CHECK-NEXT: 1 1 1.00 * btl $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btcl $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btrl $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btsl $7, (%rax)
# CHECK-NEXT: 1 1 1.00 btcq $7, %rdi
# CHECK-NEXT: 1 1 1.00 btrq $7, %rdi
# CHECK-NEXT: 1 1 1.00 btsq $7, %rdi
-# CHECK-NEXT: 1 1 0.50 * btq $7, (%rax)
+# CHECK-NEXT: 1 1 1.00 * btq $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btcq $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btrq $7, (%rax)
# CHECK-NEXT: 1 2 1.00 * * btsq $7, (%rax)
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1]
-# CHECK-NEXT: 2392.00 2051.00
+# CHECK-NEXT: 2393.50 2049.50
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] Instructions:
# CHECK-NEXT: - 1.00 btcw $7, %di
# CHECK-NEXT: - 1.00 btrw $7, %di
# CHECK-NEXT: - 1.00 btsw $7, %di
-# CHECK-NEXT: 0.50 0.50 btw $7, (%rax)
+# CHECK-NEXT: 1.00 - btw $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btcw $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btrw $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btsw $7, (%rax)
# CHECK-NEXT: - 1.00 btcl $7, %edi
# CHECK-NEXT: - 1.00 btrl $7, %edi
# CHECK-NEXT: - 1.00 btsl $7, %edi
-# CHECK-NEXT: 0.50 0.50 btl $7, (%rax)
+# CHECK-NEXT: 1.00 - btl $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btcl $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btrl $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btsl $7, (%rax)
# CHECK-NEXT: - 1.00 btcq $7, %rdi
# CHECK-NEXT: - 1.00 btrq $7, %rdi
# CHECK-NEXT: - 1.00 btsq $7, %rdi
-# CHECK-NEXT: 0.50 0.50 btq $7, (%rax)
+# CHECK-NEXT: 1.00 - btq $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btcq $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btrq $7, (%rax)
# CHECK-NEXT: 1.00 1.00 btsq $7, (%rax)
# CHECK-NEXT: 2 1 0.50 btcw $7, %di
# CHECK-NEXT: 2 1 0.50 btrw $7, %di
# CHECK-NEXT: 2 1 0.50 btsw $7, %di
-# CHECK-NEXT: 1 1 0.50 * btw $7, (%rax)
+# CHECK-NEXT: 1 4 1.00 * btw $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btcw $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btrw $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btsw $7, (%rax)
# CHECK-NEXT: 2 1 0.50 btcl $7, %edi
# CHECK-NEXT: 2 1 0.50 btrl $7, %edi
# CHECK-NEXT: 2 1 0.50 btsl $7, %edi
-# CHECK-NEXT: 1 1 0.50 * btl $7, (%rax)
+# CHECK-NEXT: 1 4 1.00 * btl $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btcl $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btrl $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btsl $7, (%rax)
# CHECK-NEXT: 2 1 0.50 btcq $7, %rdi
# CHECK-NEXT: 2 1 0.50 btrq $7, %rdi
# CHECK-NEXT: 2 1 0.50 btsq $7, %rdi
-# CHECK-NEXT: 1 1 0.50 * btq $7, (%rax)
+# CHECK-NEXT: 1 4 1.00 * btq $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btcq $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btrq $7, (%rax)
# CHECK-NEXT: 2 4 1.00 * * btsq $7, (%rax)
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
-# CHECK-NEXT: 581.50 631.50 380.00 - - - - 319.00 64.00 223.00 - - - -
+# CHECK-NEXT: 581.50 631.50 380.00 - - - - 322.00 64.00 223.00 - - - -
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btcw $7, %di
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btrw $7, %di
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btsw $7, %di
-# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btw $7, (%rax)
+# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - - - - - - btw $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btcw $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btrw $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btsw $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btcl $7, %edi
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btrl $7, %edi
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btsl $7, %edi
-# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btl $7, (%rax)
+# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - - - - - - btl $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btcl $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btrl $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btsl $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btcq $7, %rdi
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btrq $7, %rdi
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btsq $7, %rdi
-# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - btq $7, (%rax)
+# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - - - - - - btq $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btcq $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btrq $7, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - btsq $7, (%rax)
# CHECK-NEXT: 1 1 0.50 btcw $7, %di
# CHECK-NEXT: 1 1 0.50 btrw $7, %di
# CHECK-NEXT: 1 1 0.50 btsw $7, %di
-# CHECK-NEXT: 1 1 0.50 * btw $7, (%rax)
+# CHECK-NEXT: 1 4 1.00 * btw $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btcw $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btrw $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btsw $7, (%rax)
# CHECK-NEXT: 1 1 0.50 btcl $7, %edi
# CHECK-NEXT: 1 1 0.50 btrl $7, %edi
# CHECK-NEXT: 1 1 0.50 btsl $7, %edi
-# CHECK-NEXT: 1 1 0.50 * btl $7, (%rax)
+# CHECK-NEXT: 1 4 1.00 * btl $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btcl $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btrl $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btsl $7, (%rax)
# CHECK-NEXT: 1 1 0.50 btcq $7, %rdi
# CHECK-NEXT: 1 1 0.50 btrq $7, %rdi
# CHECK-NEXT: 1 1 0.50 btsq $7, %rdi
-# CHECK-NEXT: 1 1 0.50 * btq $7, (%rax)
+# CHECK-NEXT: 1 4 1.00 * btq $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btcq $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btrq $7, (%rax)
# CHECK-NEXT: 2 4 2.00 * * btsq $7, (%rax)
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
-# CHECK-NEXT: 400.00 - - 41.00 - 595.50 437.50 554.00
+# CHECK-NEXT: 400.00 - - 41.00 - 595.50 437.50 557.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
# CHECK-NEXT: - - - - - 0.50 0.50 - btcw $7, %di
# CHECK-NEXT: - - - - - 0.50 0.50 - btrw $7, %di
# CHECK-NEXT: - - - - - 0.50 0.50 - btsw $7, %di
-# CHECK-NEXT: - - - - - 0.50 0.50 - btw $7, (%rax)
+# CHECK-NEXT: - - - - - 0.50 0.50 1.00 btw $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btcw $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btrw $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btsw $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 - btcl $7, %edi
# CHECK-NEXT: - - - - - 0.50 0.50 - btrl $7, %edi
# CHECK-NEXT: - - - - - 0.50 0.50 - btsl $7, %edi
-# CHECK-NEXT: - - - - - 0.50 0.50 - btl $7, (%rax)
+# CHECK-NEXT: - - - - - 0.50 0.50 1.00 btl $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btcl $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btrl $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btsl $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 - btcq $7, %rdi
# CHECK-NEXT: - - - - - 0.50 0.50 - btrq $7, %rdi
# CHECK-NEXT: - - - - - 0.50 0.50 - btsq $7, %rdi
-# CHECK-NEXT: - - - - - 0.50 0.50 - btq $7, (%rax)
+# CHECK-NEXT: - - - - - 0.50 0.50 1.00 btq $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btcq $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btrq $7, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 2.00 btsq $7, (%rax)