Description[turbofan] Support subtraction displacements in BaseWithIndexAndDisplacementMatcher
Previously, the following schedule fragment:
1: Parameter[0](0)
2: Parameter[1](0)
7: Int32Constant[1]
8: Int32Sub(2, 7)
9: Load[kRepTagged|kTypeAny](1, 8)
would generate the following code (on ia32):
mov eax,[ebp+0x8]
mov ecx,[ebp+0xc]
sub eax,0x1
mov eax,[eax+ecx*1]
Now it generates:
mov eax,[ebp+0x8]
mov ecx,[ebp+0xc]
mov eax,[eax+ecx*1-1]
Similar pattern matching also now works on x64.
BUG=v8:5192
LOG=N
Committed: https://crrev.com/574f6fe127fac2a22c4c909177bf0f3c30085bb0
Cr-Commit-Position: refs/heads/master@{#37701}
Patch Set 1 #Patch Set 2 : Tweaks #Patch Set 3 : x64 support #Patch Set 4 : cleanup #Patch Set 5 : Rebase #Patch Set 6 : Review feedback #
Messages
Total messages: 17 (8 generated)
|