- 22 Sep, 2016 1 commit
-
-
georgia.kouveli authored
Generate TBZ/TBNZ for certain comparisons against zero. E.g. instead of: cmp w0, 0x0 b.lt/ge <addr> we can generate: tbnz/tbz w0, 31, <addr> BUG= Review-Url: https://codereview.chromium.org/2359723004 Cr-Commit-Position: refs/heads/master@{#39620}
-
- 14 Sep, 2016 1 commit
-
-
georgia.kouveli authored
BUG= Review-Url: https://codereview.chromium.org/2337953003 Cr-Commit-Position: refs/heads/master@{#39409}
-
- 07 Sep, 2016 1 commit
-
-
georgia.kouveli authored
We were previously incorrectly changing: sub r0, 0, r1 cmp r2, r0 b.cond <addr> to: cmn r2, r1 b.cond <addr> for all conditions. This is incorrect for conditions involving the C (carry) and V (overflow) flags, and in particular in the case where r1 = INT_MIN. The optimization is still safe to perform for Equal and NotEqual since they do not depend on the C and V flags. BUG= Review-Url: https://codereview.chromium.org/2318043002 Cr-Commit-Position: refs/heads/master@{#39246}
-
- 12 Aug, 2016 2 commits
-
-
georgia.kouveli authored
Instead of loading 64 bits and shifting: ldr x0, [x1, #offset] asr x0, x0, #32 directly load the interesting 32 bits and sign-extend: ldrsw x0, [x1, #offset+4] BUG= Review-Url: https://codereview.chromium.org/2243843002 Cr-Commit-Position: refs/heads/master@{#38622}
-
georgia.kouveli authored
BUG= Review-Url: https://codereview.chromium.org/2240803003 Cr-Commit-Position: refs/heads/master@{#38612}
-
- 08 Aug, 2016 1 commit
-
-
ahaas authored
This CL changes the semantics of FloatXXSub to match the semantics of the semantics of FloatXXSubPreserveNan. Therefore there is no need anymore for the FloatXXSubPreserveNan operators. The optimizations in VisitFloatXXSub which are removed in this CL have already been moved to machine-operator-reducer.cc in https://codereview.chromium.org/2226663002 R=bmeurer@chromium.org Review-Url: https://codereview.chromium.org/2220973002 Cr-Commit-Position: refs/heads/master@{#38437}
-
- 05 Aug, 2016 2 commits
-
-
ahaas authored
R=bmeurer@chromium.org Review-Url: https://codereview.chromium.org/2215403002 Cr-Commit-Position: refs/heads/master@{#38399}
-
georgia.kouveli authored
Adding new methods to the code stub assembler and interpreter assembler to combine loading and untagging SMIs, so that on 64-bit architectures we can avoid loading the full 64 bits and load the 32 interesting bits directly instead. Review-Url: https://codereview.chromium.org/2183923003 Cr-Commit-Position: refs/heads/master@{#38361}
-
- 22 Jul, 2016 1 commit
-
-
bmeurer authored
So far we don't have a useful way to inline Math.max or Math.min in TurboFan optimized code. This adds new operators NumberMax and NumberMin and changes the Float64Max/Float64Min operators to have JavaScript semantics instead of the C++ semantics that it had previously. This also removes support for recognizing the tenary case in the CommonOperatorReducer, since that doesn't seem to have any positive impact (and actually doesn't show up in regular JavaScript, where people use Math.max/Math.min instead). Drive-by-fix: Also nuke the unused Float32Max/Float32Min operators. R=jarin@chromium.org Review-Url: https://codereview.chromium.org/2170343002 Cr-Commit-Position: refs/heads/master@{#37971}
-
- 29 Jun, 2016 1 commit
-
-
georgia.kouveli authored
Perform the following transformation: | Before | After | |------------------+---------------------| | add w2, w0, w1 | adds w2, w0, w1 | | cmp w2, #0x0 | b.<cond'> <addr> | | b.<cond> <addr> | | |------------------+---------------------| | add w2, w0, w1 | adds w2, w0, w1 | | cmp #0x0, w2 | b.<cond'> <addr> | | b.<cond> <addr> | | and the same for and instructions instead of add. When the result of the add/and is not used, generate cmn/tst instead. We need to take care with which conditions we can handle and what new condition we map them to. BUG= Review-Url: https://codereview.chromium.org/2065243005 Cr-Commit-Position: refs/heads/master@{#37400}
-
- 23 Jun, 2016 1 commit
-
-
georgia.kouveli authored
CMN is a flag-setting add operation, and therefore is commutative. {Add,Sub}WithOverflow generate ADD/SUB instructions that cannot support a ROR shift. BUG= Review-Url: https://codereview.chromium.org/2087233005 Cr-Commit-Position: refs/heads/master@{#37212}
-
- 01 Jun, 2016 1 commit
-
-
pierre.langlois authored
This patch enables the following transformations in the instruction selector: | Before | After | |------------------+------------------------| | and x3, x1, #0x1 | tb{,n}z w1, #0, #+0x78 | | cmp x3, #0x0 | | | b.{eq,ne} #+0x80 | | |------------------+------------------------| | cmp x0, #0x0 | cb{,n}z x0, #+0x48 | | b.{eq,ne} #+0x4c | | I have not seen these patterns beeing generated by turbofan, however the stubs hit these cases frequently. A particular reason is that we are turning operations that check for a Smi into a single `tbz`. As a concequence, the interpreter is affected thanks to inlining turbofan stubs into it's bytecode handlers. I have noticed the size of the interpreter was reduced by 200 instructions. BUG= Review-Url: https://codereview.chromium.org/2022073002 Cr-Commit-Position: refs/heads/master@{#36632}
-
- 27 May, 2016 1 commit
-
-
georgia.kouveli authored
Adding optional operators for FNeg for WebAssembly, as the current implementation was significantly suboptimal for ARM. Review-Url: https://codereview.chromium.org/2011303002 Cr-Commit-Position: refs/heads/master@{#36544}
-
- 13 May, 2016 1 commit
-
-
pierre.langlois authored
This patch adds support for the `Operand2_R_LSL_I` addressing mode to loads and stores. This allows merging a shift instruction into a MemoryOperand. Since the shift immediate is restricted to the log2 of the operation width, the opportunities to hit this are slim. However, Ignition's bytecode handlers hit this case all the time: kind = BYTECODE_HANDLER name = Star compiler = turbofan Instructions (size = 44) 0x23e67280 0 add x1, x19, #0x1 (1) 0x23e67284 4 ldrsb x1, [x20, x1] 0x23e67288 8 sxtw x1, w1 0x23e6728c 12 mov x2, fp 0x23e67290 16 str x0, [x2, x1, lsl #3] ^^^^^^^^^^^^^^^^^^^^^ 0x23e67294 20 add x19, x19, #0x2 (2) 0x23e67298 24 ldrb w1, [x20, x19] 0x23e6729c 28 ldr x1, [x21, x1, lsl #3] ^^^^^^^^^^^^^^^^^^^^^ 0x23e672a0 32 br x1 Additionally, I noticed the optimisation occurs once in both the `StringPrototypeCharAt` and `StringPrototypeCharCodeAt` turbofan stubs. BUG= Review-Url: https://codereview.chromium.org/1972103002 Cr-Commit-Position: refs/heads/master@{#36227}
-
- 04 May, 2016 2 commits
-
-
pierre.langlois authored
A load instruction will implicitely clear the top 32 bits when writing to a W register. This patch avoids generating a `mov` instruction to zero-extend the result in this case. For example, this occurs in the generated code for dispatching to the next bytecode in the interpreter: kind = BYTECODE_HANDLER name = LdaZero compiler = turbofan Instructions (size = 36) 0x32e64c60 0 add x19, x19, #0x1 (1) 0x32e64c64 4 ldrb w0, [x20, x19] 0x32e64c68 8 mov w0, w0 ^^^^^^^^^^ 0x32e64c6c 12 lsl x0, x0, #3 0x32e64c70 16 ldr x1, [x21, x0] 0x32e64c74 20 movz x0, #0x0 0x32e64c78 24 br x1 BUG= Review-Url: https://codereview.chromium.org/1950013003 Cr-Commit-Position: refs/heads/master@{#36038}
-
martyn.capewell authored
When storing an immediate integer or floating point zero, use the zero register as the source value. This avoids the need to sometimes allocate a new register. BUG= Review-Url: https://codereview.chromium.org/1945783002 Cr-Commit-Position: refs/heads/master@{#36013}
-
- 11 Dec, 2015 1 commit
-
-
jarin authored
Review URL: https://codereview.chromium.org/1513383003 Cr-Commit-Position: refs/heads/master@{#32803}
-
- 10 Dec, 2015 1 commit
-
-
jarin authored
MachineType is now a class with two enum fields: - MachineRepresentation - MachineSemantic Both enums are usable on their own, and this change switches some places from using MachineType to use just MachineRepresentation. Most notably: - register allocator now uses just the representation. - Phi and Select nodes only refer to representations. Review URL: https://codereview.chromium.org/1513543003 Cr-Commit-Position: refs/heads/master@{#32738}
-
- 30 Nov, 2015 1 commit
-
-
vogelheim authored
R=bmeurer@chromium.org, mstarzinger@chromium.org BUG=chromium:508898 LOG=Y Review URL: https://codereview.chromium.org/1477413002 Cr-Commit-Position: refs/heads/master@{#32400}
-
- 07 Nov, 2015 1 commit
-
-
martyn.capewell authored
Use compare-negate instruction if the right-hand input to a compare is a negate operation. BUG= Review URL: https://codereview.chromium.org/1410123009 Cr-Commit-Position: refs/heads/master@{#31866}
-
- 29 Oct, 2015 1 commit
-
-
mstarzinger authored
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1424983003 Cr-Commit-Position: refs/heads/master@{#31646}
-
- 28 Oct, 2015 1 commit
-
-
jacob.bramley authored
Float(32|64)Min: // (a < b) ? a : b fcmp da, db fcsel dd, da, db, lo Float(32|64)Max: // (b < a) ? a : b fcmp db, da fcsel dd, da, db, lo BUG= Review URL: https://codereview.chromium.org/1360603003 Cr-Commit-Position: refs/heads/master@{#31621}
-
- 26 Oct, 2015 1 commit
-
-
rmcilroy authored
Adds support for loading from and storing to outer context variables. Also adds support for declaring functions on contexts and locals. Finally, fixes a couple of issues with StaContextSlot where we weren't emitting the write barrier and therefore would crash in the GC. Also added code so that --print-bytecode will output the function name before the bytecodes, and replaces MachineType with StoreRepresentation in RawMachineAssembler::Store and updates tests. BUG=v8:4280 LOG=N Review URL: https://codereview.chromium.org/1425633002 Cr-Commit-Position: refs/heads/master@{#31584}
-
- 14 Oct, 2015 1 commit
-
-
martyn.capewell authored
Support negate with shifted input on ARM64 by supporting lhs zero registers for binary operations, and removing explicit Neg instruction support. Review URL: https://codereview.chromium.org/1404093003 Cr-Commit-Position: refs/heads/master@{#31263}
-
- 24 Sep, 2015 1 commit
-
-
pierre.langlois authored
This patch explicitly names commuted conditions for floating point comparisons, instead of relying on CommuteFlagsCondition. Otherwise, a bug in this function would not be caught. BUG= Review URL: https://codereview.chromium.org/1364773002 Cr-Commit-Position: refs/heads/master@{#30905}
-
- 23 Sep, 2015 1 commit
-
-
pierre.langlois authored
This patch checks the type of the lhs operand of a floating point comparison, and commutes the operands if it is #0.0. It allows us to optimize a comparison with zero, as the fcmp instruction accepts #0.0 as rhs operand. Code before for "0.0 < 0.123": ------------------------------ fmov d1, xzr ldr d0, pc+96 fcmp d1, d0 b.lo #+0xc Code after: ----------- ldr d0, pc+92 fcmp d0, #0.0 b.gt #+0xc Before this patch, we used unsigned condition codes for floating point comparisons, but the unordered case was not correctly commuted. Review URL: https://codereview.chromium.org/1356283003 Cr-Commit-Position: refs/heads/master@{#30881}
-
- 31 Jul, 2015 1 commit
-
-
martyn.capewell authored
Improve code generated for flag materialization. Review URL: https://codereview.chromium.org/1260733003 Cr-Commit-Position: refs/heads/master@{#29954}
-
- 02 Jul, 2015 1 commit
-
-
martyn.capewell authored
Support 32-bit cmp with shift/extend by reusing the existing add/sub shift and extend code. Review URL: https://codereview.chromium.org/1218103005 Cr-Commit-Position: refs/heads/master@{#29435}
-
- 30 Jun, 2015 1 commit
-
-
martyn.capewell authored
Move the arithmetic shift from Int32MulHigh to a following Int32Add on ARM64. This graph is commonly generated on reduction of signed integer division. Review URL: https://codereview.chromium.org/1209413008 Cr-Commit-Position: refs/heads/master@{#29380}
-
- 12 Jun, 2015 2 commits
-
-
jacob.bramley authored
With this patch, we can generate simple immediate-shift instructions for immediates outside the range "0 <= imm < width". Several related instruction selectors have also been updated accordingly. Example of generated code: ---- Before --- ---- After ---- movz w0, #33 lsr w0, w1, #1 lsr w0, w1, w0 BUG= Review URL: https://codereview.chromium.org/1179893003 Cr-Commit-Position: refs/heads/master@{#28977}
-
martyn.capewell authored
Before selecting multiply-accumulate for a multiplication with add operation, check that the multiply can't be reduced to add-with-shift. This prevents simple multiplications by 3, 5, etc turning into register moves and madd instructions. Review URL: https://codereview.chromium.org/1180863002 Cr-Commit-Position: refs/heads/master@{#28976}
-
- 11 Jun, 2015 3 commits
-
-
martyn.capewell authored
Merge a following arithmetic or logical right shift into the existing shift of ARM64's Int32MulHigh or Uint32MulHigh code. BUG= Review URL: https://codereview.chromium.org/1179503003 Cr-Commit-Position: refs/heads/master@{#28945}
-
jacob.bramley authored
Revert of [arm64][turbofan]: Handle any immediate shift. (patchset #1 id:1 of https://codereview.chromium.org/1179733004/) Reason for revert: Breaks InstructionSelectorTest.Word64ShrWithWord64AndWithImmediate on debug builds (but not optdebug builds). I'll investigate. Original issue's description: > [arm64][turbofan]: Handle any immediate shift. > > With this patch, we can generate simple immediate-shift instructions for > immediates outside the range "0 <= imm < width". Several related > instruction selectors have also been updated accordingly. > > Example of generated code: > > ---- Before --- ---- After ---- > movz w0, #33 lsr w0, w1, #1 > lsr w0, w1, w0 > > BUG= > > Committed: https://crrev.com/36d771bbfa4af5efcc1c1dcf5b234445cb7ee722 > Cr-Commit-Position: refs/heads/master@{#28943} TBR=bmeurer@chromium.org,ulan@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1176393002 Cr-Commit-Position: refs/heads/master@{#28944}
-
jacob.bramley authored
With this patch, we can generate simple immediate-shift instructions for immediates outside the range "0 <= imm < width". Several related instruction selectors have also been updated accordingly. Example of generated code: ---- Before --- ---- After ---- movz w0, #33 lsr w0, w1, #1 lsr w0, w1, w0 BUG= Review URL: https://codereview.chromium.org/1179733004 Cr-Commit-Position: refs/heads/master@{#28943}
-
- 02 Jun, 2015 1 commit
-
-
martyn.capewell authored
Select ubfiz for (x & mask) << imm where mask is contiguous and imm is non-zero. BUG= Review URL: https://codereview.chromium.org/1161643003 Cr-Commit-Position: refs/heads/master@{#28755}
-
- 15 May, 2015 1 commit
-
-
martyn.capewell authored
Enable clang's shorten-64-to-32 warning flag on ARM64, and fix the warnings that arise. BUG= Review URL: https://codereview.chromium.org/1131573006 Cr-Commit-Position: refs/heads/master@{#28412}
-
- 08 May, 2015 1 commit
-
-
martyn.capewell authored
Select sbfx for ((x << k) >> k) in ARM64 instruction selector, and similarly for ubfx. This is a more generic version of the previous sxtb/h selector. BUG= Review URL: https://codereview.chromium.org/1135543002 Cr-Commit-Position: refs/heads/master@{#28318}
-
- 08 Apr, 2015 1 commit
-
-
Benedikt Meurer authored
These operators compute the absolute floating point value of some arbitrary input, and are implemented without any branches (i.e. using vabs on arm, and andps/andpd on x86). R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/1066393002 Cr-Commit-Position: refs/heads/master@{#27662}
-
- 07 Apr, 2015 2 commits
-
-
martyn.capewell authored
Support sxtb and sxth extend operators on add and subtract, as we've done for ubtx/h. This is similar to ARM support for sxtab/h. BUG= Review URL: https://codereview.chromium.org/1064813003 Cr-Commit-Position: refs/heads/master@{#27624}
-
baptiste.afsa authored
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1056543002 Cr-Commit-Position: refs/heads/master@{#27612}
-