[llvm] r311828 - [X86] Qualify the RMW INC/DEC patterns with NotSlowIncDec.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 23:24:26 PDT 2017
Author: ctopper
Date: Fri Aug 25 23:24:25 2017
New Revision: 311828
URL: http://llvm.org/viewvc/llvm-project?rev=311828&view=rev
Log:
[X86] Qualify the RMW INC/DEC patterns with NotSlowIncDec.
We were suppressing most uses of INC/DEC, but this one seems to have been missed.
Modified:
llvm/trunk/lib/Target/X86/X86InstrArithmetic.td
llvm/trunk/test/DebugInfo/COFF/register-variables.ll
Modified: llvm/trunk/lib/Target/X86/X86InstrArithmetic.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrArithmetic.td?rev=311828&r1=311827&r2=311828&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrArithmetic.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrArithmetic.td Fri Aug 25 23:24:25 2017
@@ -481,7 +481,7 @@ def INC32r_alt : I<0x40, AddRegFrm, (out
} // CodeSize = 1, hasSideEffects = 0
} // Constraints = "$src1 = $dst", SchedRW
-let CodeSize = 2, SchedRW = [WriteALULd, WriteRMW] in {
+let CodeSize = 2, SchedRW = [WriteALULd, WriteRMW], Predicates = [NotSlowIncDec] in {
def INC8m : I<0xFE, MRM0m, (outs), (ins i8mem :$dst), "inc{b}\t$dst",
[(store (add (loadi8 addr:$dst), 1), addr:$dst),
(implicit EFLAGS)], IIC_UNARY_MEM>;
@@ -528,7 +528,7 @@ def DEC32r_alt : I<0x48, AddRegFrm, (out
} // Constraints = "$src1 = $dst", SchedRW
-let CodeSize = 2, SchedRW = [WriteALULd, WriteRMW] in {
+let CodeSize = 2, SchedRW = [WriteALULd, WriteRMW], Predicates = [NotSlowIncDec] in {
def DEC8m : I<0xFE, MRM1m, (outs), (ins i8mem :$dst), "dec{b}\t$dst",
[(store (add (loadi8 addr:$dst), -1), addr:$dst),
(implicit EFLAGS)], IIC_UNARY_MEM>;
Modified: llvm/trunk/test/DebugInfo/COFF/register-variables.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/register-variables.ll?rev=311828&r1=311827&r2=311828&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/register-variables.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/register-variables.ll Fri Aug 25 23:24:25 2017
@@ -46,7 +46,7 @@
; ASM: [[after_inc_eax:\.Ltmp.*]]:
; ASM: #DEBUG_VALUE: inlineinc:b <- %EAX
; ASM: #DEBUG_VALUE: b <- %EAX
-; ASM: incl x(%rip)
+; ASM: addl $1, x(%rip)
; ASM: [[after_if:\.Ltmp.*]]:
; ASM: .LBB0_2: # %if.else
; ASM: #DEBUG_VALUE: f:p <- %ESI
@@ -104,7 +104,7 @@
; OBJ: LocalVariableAddrRange {
; OBJ: OffsetStart: .text+0x7
; OBJ: ISectStart: 0x0
-; OBJ: Range: 0x19
+; OBJ: Range: 0x1A
; OBJ: }
; OBJ: }
; OBJ: LocalSym {
@@ -146,7 +146,7 @@
; OBJ: MayHaveNoName: 0
; OBJ: OffsetStart: .text+0x13
; OBJ: ISectStart: 0x0
-; OBJ: Range: 0x6
+; OBJ: Range: 0x7
; OBJ: }
; OBJ: }
; OBJ: InlineSiteSym {
@@ -180,7 +180,7 @@
; OBJ: LocalVariableAddrRange {
; OBJ: OffsetStart: .text+0x13
; OBJ: ISectStart: 0x0
-; OBJ: Range: 0x6
+; OBJ: Range: 0x7
; OBJ: }
; OBJ: }
; OBJ: InlineSiteEnd {
More information about the llvm-commits
mailing list