On 2015/06/11 10:01:20, martyn.capewell wrote:

https://codereview.chromium.org/1179503003/diff/1/src/compiler/arm64/instruction-selector-arm64.cc
File src/compiler/arm64/instruction-selector-arm64.cc (right):


https://codereview.chromium.org/1179503003/diff/1/src/compiler/arm64/instruction-selector-arm64.cc#newcode749
src/compiler/arm64/instruction-selector-arm64.cc:749: if
(m.left().IsUint32MulHigh() && m.right().HasValue() &&
On 2015/06/11 04:25:52, Benedikt Meurer wrote:
> Can we limit the values on the right to [1,31] here? I.e. use
> m.right().IsInRange(1,31) instead?

I can, but I thought this operation was defined as only considering the bottom
five bits of the shift operand, as in JS. The unit test provided tries to
check
this, too.

We also have a follow-up patch that resolves some of the semantics in this
area.
For example, we've seen shifts generated with shift operands > 31, where the operand is placed into a register for a register-controlled shift, which isn't
necessary.

Well, I'd prefer to keep it simple on this level. Shift operands outside the
valid range is undefined behavior in C/C++ and I'd like to adhere to that model
if possible. At least I'd be nice if we would not try to cover that with
optimizations.

https://codereview.chromium.org/1179503003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to