I think this problem is not limited to x64, but affects all 64bit
platforms, so
we may need to think about a way to push/hoist the ChangeUint32ToUint64
operations up.
https://codereview.chromium.org/860283004/diff/1/src/compiler/x64/instruction-selector-x64.cc
File src/compiler/x64/instruction-selector-x64.cc (right):
https://codereview.chromium.org/860283004/diff/1/src/compiler/x64/instruction-selector-x64.cc#newcode14
src/compiler/x64/instruction-selector-x64.cc:14: static bool
OpZeroExtends(Node *value) {
Use anonymous namespace instead of static.
https://codereview.chromium.org/860283004/diff/1/src/compiler/x64/instruction-selector-x64.cc#newcode132
src/compiler/x64/instruction-selector-x64.cc:132: if (index32->opcode()
== IrOpcode::kInt32Add) {
I don't think this optimization is sound. You basically assume that
ChangeUint32ToUint64(Int32Add(x,y)) is equivalent to
Int64Add(ChangeUint32ToUint64(x), ChangeUint32ToUint64(y)), which
doesn't hold in general.
https://codereview.chromium.org/860283004/diff/1/src/compiler/x64/instruction-selector-x64.cc#newcode134
src/compiler/x64/instruction-selector-x64.cc:134: if
(madd.right().HasValue() && OpZeroExtends(madd.left().node()) &&
CanBeImmediate(mdd.right().node()) implies madd.right().HasValue(), so
you don't need to check madd.right().HasValue().
https://codereview.chromium.org/860283004/
--
--
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.