[PATCH] D55485: [X86] Fix avoid store forwarding blocks pass for negative displacements
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 9 04:13:28 PST 2018
nikic updated this revision to Diff 177410.
nikic added a comment.
Rebase over committed test.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55485/new/
https://reviews.llvm.org/D55485
Files:
lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
test/CodeGen/X86/pr39926.ll
Index: test/CodeGen/X86/pr39926.ll
===================================================================
--- test/CodeGen/X86/pr39926.ll
+++ test/CodeGen/X86/pr39926.ll
@@ -8,9 +8,9 @@
; CHECK-NEXT: movb $0, 7(%rdi)
; CHECK-NEXT: movw $0, 5(%rdi)
; CHECK-NEXT: movl $0, 1(%rdi)
-; CHECK-NEXT: movzwl -4(%rdi), %eax
-; CHECK-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
-; CHECK-NEXT: movb -2(%rdi), %al
+; CHECK-NEXT: movl -4(%rdi), %eax
+; CHECK-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
+; CHECK-NEXT: movb (%rdi), %al
; CHECK-NEXT: movb %al, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: movl 1(%rdi), %eax
; CHECK-NEXT: movl %eax, -{{[0-9]+}}(%rsp)
Index: lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
===================================================================
--- lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
+++ lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
@@ -586,7 +586,7 @@
StDisp2 += OverlapDelta;
Size2 -= OverlapDelta;
}
- Size1 = std::abs(std::abs(LdDisp2) - std::abs(LdDisp1));
+ Size1 = LdDisp2 - LdDisp1;
// Build a copy for the point until the current blocking store's
// displacement.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55485.177410.patch
Type: text/x-patch
Size: 1168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181209/53de7d75/attachment.bin>
More information about the llvm-commits
mailing list