Mercurial > hg > truffle
annotate graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/LeftShift.java @ 3490:ce7cf6d16b38
Reintroduce Conditional (IfOp) using the new infrastructure, fix the Cmov support in the backend, use x86 cmov when possible, make it work with floating point comparison conditions, make MaterializeNode a subclass of Conditional, fix nasty bug related to introducing LIR jumps in an existing LIRBlock in MaterializeNode/Conditional
Canonicalize FDConversionNode if input is constant
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Fri, 05 Aug 2011 17:40:35 +0200 |
parents | 80d27a8a022b |
children | 9b59afa78775 |
rev | line source |
---|---|
2865
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
1 /* |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
4 * |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
8 * |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
14 * |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
18 * |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
21 * questions. |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
22 */ |
2874
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
23 package com.oracle.max.graal.compiler.ir; |
2865
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
24 |
2899
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
25 import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.CanonicalizerOp; |
3490
ce7cf6d16b38
Reintroduce Conditional (IfOp) using the new infrastructure, fix the Cmov support in the backend, use x86 cmov when possible, make it work with floating point comparison conditions, make MaterializeNode a subclass of Conditional, fix nasty bug related to introducing LIR jumps in an existing LIRBlock in MaterializeNode/Conditional
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2899
diff
changeset
|
26 import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.NotifyReProcess; |
2874
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
27 import com.oracle.max.graal.graph.*; |
2865
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
28 import com.sun.cri.bytecode.*; |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
29 import com.sun.cri.ci.*; |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
30 |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
31 |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
32 public final class LeftShift extends Shift { |
2899
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
33 private static final LeftShiftCanonicalizerOp CANONICALIZER = new LeftShiftCanonicalizerOp(); |
2865
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
34 |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
35 public LeftShift(CiKind kind, Value x, Value y, Graph graph) { |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
36 super(kind, kind == CiKind.Int ? Bytecodes.ISHL : Bytecodes.LSHL, x, y, graph); |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
37 } |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
38 |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
39 @Override |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
40 public String shortName() { |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
41 return "<<"; |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
42 } |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
43 |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
44 @Override |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
45 public Node copy(Graph into) { |
2880
385a4d7c2a78
Added new duplication phase (for verification). Fixes in Node.copy method implementations.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2874
diff
changeset
|
46 LeftShift ls = new LeftShift(kind, null, null, into); |
2865
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
47 return ls; |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
48 } |
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
49 |
2899
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
50 @SuppressWarnings("unchecked") |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
51 @Override |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
52 public <T extends Op> T lookup(Class<T> clazz) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
53 if (clazz == CanonicalizerOp.class) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
54 return (T) CANONICALIZER; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
55 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
56 return super.lookup(clazz); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
57 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
58 |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
59 private static class LeftShiftCanonicalizerOp implements CanonicalizerOp { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
60 @Override |
3490
ce7cf6d16b38
Reintroduce Conditional (IfOp) using the new infrastructure, fix the Cmov support in the backend, use x86 cmov when possible, make it work with floating point comparison conditions, make MaterializeNode a subclass of Conditional, fix nasty bug related to introducing LIR jumps in an existing LIRBlock in MaterializeNode/Conditional
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2899
diff
changeset
|
61 public Node canonical(Node node, NotifyReProcess reProcess) { |
2899
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
62 LeftShift leftShift = (LeftShift) node; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
63 CiKind kind = leftShift.kind; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
64 Graph graph = leftShift.graph(); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
65 Value value = leftShift.x(); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
66 Value y = leftShift.y(); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
67 if (y.isConstant()) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
68 int amount = y.asConstant().asInt(); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
69 int originalAmout = amount; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
70 int mask; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
71 if (kind == CiKind.Int) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
72 mask = 0x1f; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
73 } else { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
74 assert kind == CiKind.Long; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
75 mask = 0x3f; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
76 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
77 amount &= mask; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
78 if (value.isConstant()) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
79 if (kind == CiKind.Int) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
80 return Constant.forInt(value.asConstant().asInt() << amount, graph); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
81 } else { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
82 assert kind == CiKind.Long; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
83 return Constant.forLong(value.asConstant().asLong() << amount, graph); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
84 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
85 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
86 if (amount == 0) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
87 return value; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
88 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
89 if (value instanceof Shift) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
90 Shift other = (Shift) value; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
91 if (other.y().isConstant()) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
92 int otherAmount = other.y().asConstant().asInt() & mask; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
93 if (other instanceof LeftShift) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
94 int total = amount + otherAmount; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
95 if (total != (total & mask)) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
96 return Constant.forInt(0, graph); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
97 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
98 return new LeftShift(kind, other.x(), Constant.forInt(total, graph), graph); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
99 } else if ((other instanceof RightShift || other instanceof UnsignedRightShift) && otherAmount == amount) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
100 if (kind == CiKind.Long) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
101 return new And(kind, other.x(), Constant.forLong(-1L << amount, graph), graph); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
102 } else { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
103 assert kind == CiKind.Int; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
104 return new And(kind, other.x(), Constant.forInt(-1 << amount, graph), graph); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
105 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
106 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
107 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
108 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
109 if (originalAmout != amount) { |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
110 return new LeftShift(kind, value, Constant.forInt(amount, graph), graph); |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
111 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
112 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
113 return leftShift; |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
114 } |
80d27a8a022b
Fix on canonicalization plus canonicalization of shifts and integer arithmetics
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2880
diff
changeset
|
115 } |
2865
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
diff
changeset
|
116 } |